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

RandomQuotr

描述

Allows the user to create a list of quotes and then display either a random or specific quote from that list using custom template tags or shortcodes.

安裝

  1. Upload the plugin files to the /wp-content/plugins/randomquotr directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings->RandomQuotr screen add quotes in the textarea on the left-hand side. Quotes are split by carriage returns (line breaks)
  4. Use the following hooks to display the quotes:

Get a random quote
* rdqr_random_quote(); – this will display the text automatically.
* $quote = rdqr_get_random_quote(); – this stores the text within a variable.

Getting a specific quote
* rdqr_target_quote(3); – this will display the third quote in the list.
* $quote = rdqr_get_target_quote(); – this stores the text within a variable.

常見問題

Installation Instructions
  1. Upload the plugin files to the /wp-content/plugins/randomquotr directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings->RandomQuotr screen add quotes in the textarea on the left-hand side. Quotes are split by carriage returns (line breaks)
  4. Use the following hooks to display the quotes:

Get a random quote
* rdqr_random_quote(); – this will display the text automatically.
* $quote = rdqr_get_random_quote(); – this stores the text within a variable.

Getting a specific quote
* rdqr_target_quote(3); – this will display the third quote in the list.
* $quote = rdqr_get_target_quote(); – this stores the text within a variable.

I’m using rdqr_target_quote(0) and nothing’s coming up! I know I have added quotes

The list starts at 1 not 0.

rdqr_target_quote and rdqr_get_target_quote are not doing anything!

Make sure that you are passing in a valid value. If you are passing in an invalid number (below 1, above the number of quotes), a non-number (“forty”), or there are no quotes to get, all of the functions will return null.

Can a shortcode be used to display a random quote?

Yes, use [rdqr_randomquote] in a page or post.

Can a shortcode be used to display a specific quote?

Yes, use [rdqr_targetquote singlequote=”3″] to display the third quote. Change the number 3 to the quote that you want displayed.

Can shortcodes be used in theme files?

Yes, to display a random quote place in your theme template. Display a specific quote by placing in your theme template. Change the number 3 to the quote that you want displayed.

Can shortcodes be used in widgets?

Yes, the shortcodes can be used in widgets.

評價

There are no reviews for this plugin.

貢獻者及開發者

“RandomQuotr” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 RandomQuotr 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

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

修改日誌

1.0.2

  • added shortcodes

1.0.1

  • made within the functions.php file of the theme

1.0.0

  • created plugin, cleaned things up