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

A Random Number

外掛說明

The shortcode [arandomnumber] can be added to any post, page, or widget as many times as needed to display a random number. The number has a default range of 1 – 100, but can be changed using the min and max attributes, like so:

[arandomnumber min=1 max=10000]: This will output a random number between 1 and 10,000. (Like this: 8,014)
[arandomnumber min=-500 max=-1]: This will output a random number between -500 and -1. (Like this: -232)
[arandomnumber min=50000000 max=60000000]: This will output a random number between 50,000,000 and 60,000,000. (Like this: 56,449,060)

etc.

If you wish to disable commas, use the comma=no attribute, like so: [arandomnumber min=100000 max=999999 comma=no]. This will output a random number within the range without the commas, like this: 456245.

For full documentation, see the plugin’s page: https://www.macardam.com/a-random-number/

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/a-random-number directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the shortcode to display your magic number.

常見問題集

Why does this plugin exist? It seems kind of pointless?

How dare you. It outputs a random number, so if you need a random number, there is nothing better. This is also useful to check if a page is being cached or if your server is properly loading since the number will change on every page load. Use it to add random parameters to forms, urls, etc.

See? That’s practical.

How do I use this plugin?

For full documentation, see the plugin’s page: https://www.macardam.com/a-random-number/

使用者評論

2021 年 1 月 18 日
I use it to add a random number to a hidden form field in a form used to invite others to register That is then emailed as part of the invitation and entered by the person when they register to verify them..
2018 年 5 月 21 日
This plugin is awesome, it's useful and so easy to use (you just have to insert a shortcode anywhere you want and baaaaam).
2017 年 12 月 14 日
I needed a way to force a link to reload and not use the cached version. This tool allowed me to insert a random number in the URL.
2016 年 9 月 3 日
It does what it says it does. Simple yet works, used it to help me with testing page caching.
閱讀全部 4 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈A Random Number〉的開發相關工作。

參與者

將〈A Random Number〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.1

  • Added comma attribute to remove commas if needed.
  • Released August 19, 2017

1.0

  • Launched A Random Number into the Internets. It’s alive!
  • Released January 8, 2016