开发者 | blogvii |
---|---|
更新时间 | 2024年11月3日 22:49 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 6.6.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
1
.100
.1
.even
for even numbers and odd
for odd numbers.yes
to include commas in large numbers, or no
to remove them. Default is yes
.0
.ID-
.-XYZ
.[blogvii_rand_number]
[blogvii_rand_number min=1 max=100]
[blogvii_rand_number count=5]
[blogvii_rand_number type=odd]
[blogvii_rand_number prefix="ID-"]
The B7 Random Number plugin allows you to generate random numbers within your WordPress posts, pages, or widgets using a simple shortcode. You can customize the range, formatting, and type of number generated.
To use the shortcode, simply insert [blogvii_random_number]
into your post or page. You can customize it with parameters like min
, max
, count
, type
, prefix
, and suffix
to fit your needs.
Yes! You can specify a minimum and maximum range using the min
and max
attributes. For example: [blogvii_random_number min=1 max=100]
will generate a random number between 1 and 100.
Absolutely! You can generate multiple random numbers by using the count
attribute. For example: [blogvii_random_number count=5]
will generate five random numbers.
Yes, you can specify the type of number you want to generate by using the type
attribute. Use type=even
for even numbers and type=odd
for odd numbers. For example: [blogvii_random_number type=even]
.
You can control the formatting of the output using the comma
and decimals
attributes. Set comma=no
to remove commas, and specify the number of decimal places with the decimals
attribute, like so: [blogvii_random_number decimals=2]
.
If the minimum value is not less than the maximum value, the shortcode will return an error message: "Invalid range: min must be less than max."
Yes, you can add a prefix or suffix by using the prefix
and suffix
attributes. For example: [blogvii_random_number prefix="ID-" suffix="-XYZ"]
will output something like "ID-45-XYZ".
Yes, the B7 Random Number plugin utilizes WordPress's built-in functions for secure random number generation and data sanitization, ensuring a secure experience.