mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Docs: Update wp_rand docblock to clarify that it returns a non-negative number.
Props hakre, westi, jeremyfelt, neychok, sabernhardt, audrasjb. Fixes #15089. git-svn-id: https://develop.svn.wordpress.org/trunk@54190 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2612,7 +2612,7 @@ endif;
|
||||
|
||||
if ( ! function_exists( 'wp_rand' ) ) :
|
||||
/**
|
||||
* Generates a random number.
|
||||
* Generates a random non-negative number.
|
||||
*
|
||||
* @since 2.6.2
|
||||
* @since 4.4.0 Uses PHP7 random_int() or the random_compat library if available.
|
||||
@@ -2624,7 +2624,7 @@ if ( ! function_exists( 'wp_rand' ) ) :
|
||||
* Accepts positive integers or zero. Defaults to 0.
|
||||
* @param int $max Optional. Upper limit for the generated number.
|
||||
* Accepts positive integers. Defaults to 4294967295.
|
||||
* @return int A random number between min and max.
|
||||
* @return int A random non-negative number between min and max.
|
||||
*/
|
||||
function wp_rand( $min = null, $max = null ) {
|
||||
global $rnd_value;
|
||||
|
||||
Reference in New Issue
Block a user