這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

PCF Christmas Countdown

外掛說明

Basic Instructions

This plugin works out-of-the-box, so once the plugin is installed, you can place a shortcode wherever you want.

Use the shortcode [pcf_xmas_countdown] to output the countdown.

The countdown will output in days by default (e.g ‘105 days until Christmas!’).

Changing output type

The shortcode can be given a ‘type’ attribute, like so:

[pcf_xmas_countdown type="days|weeks|sleeps"]

This enables you to change the output type.

There are 3 types to choose from:

  • Days
  • Weeks
  • Sleeps

If you do not specify the type attribute, or specify an invalid type, it will default to ‘days’.

Example:

[pcf_xmas_countdown type="weeks"]

will output as

It's `x` weeks and `y` days until Christmas!

Styling the output

Styling the output is an advanced setting, that involves writing custom CSS.

The shortcode can be given an ‘id’ attribute, which can then be used to style the output using CSS.

For example,

[pcf_xmas_countdown id="my-id"]

would output in HTML as

<p id="my-id">...</p>

You can then add custom CSS through Appearance > Editor. If your theme supports custom CSS, you may be able to add your styles in Theme Options. If there is a custom css file in Editor, it is advised to use that for custom styles.

Here is an example of some custom styles:

#my-id{
    color: red;
    font-size: 16px;
    text-decoration: underline;
}

This will set the output to be red, underlined, and to have a font size of 16px.

螢幕擷圖

  • 'Days and Weeks' Countdown
  • 'Days' Countdown
  • 'Weeks' Countdown
  • 'Sleeps' Countdown

安裝方式

  1. Upload ‘christmas-countdown.zip’ to WordPress
  2. Activate the plugin once installed.
  3. Place shortcode where you want the countdown to appear!

常見問題集

Can I style the outputted text?

Yes! You can add an ID using the id id attribute. See ‘Description’ for more information.

Can I change the output text?

Other than the built in type attributes, no. However, with the premium version of our plugin you can custom this text.

使用者評論

閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈PCF Christmas Countdown〉的開發相關工作。

參與者

將〈PCF Christmas Countdown〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.2

  • [Fixed] Fixed a bug that caused the admin notice to appear on every page. It now only appears on the plugins page.

2.1

  • [Added] Added widget feature for users who don’t want to use shortcodes. The widget takes 2 inputs: type and id, which work in the same way as the shortcode attributes.
  • [Update] Rewrote some algorithms for more robustness and efficiency

2.0

  • [Updated] Rewrote a large amount of the output code and changed the counter so that it is accurate.
  • [Added] Added a new output for when the event is on the same day as viewing. i.e on the set date the output will be “It’s event!”.

1.4

  • [Updated] Made the plugin show the word ‘day’ instead of ‘days’ when applicable. Same applies to ‘weeks’.

1.3

  • [Updated] Stopped the weeks output displaying ‘0 days’ or ‘0 weeks’

1.2

  • [Updated] Changed some function names to make them more unique and compatible with our other plugins.

1.1

  • [Fixed] Fixed an issue where the plugin would show negative numbers if the date had past.

  • [Updated] Changed the countdown algorithm; is now much easier to work with.

1.0

  • Published Plugin