From f4faaa53c7aa3a5ad4ba9dcd6dc5df711c81d114 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 4 Dec 2017 22:40:47 +0000 Subject: [PATCH] Docs: Improve the usefulness of docs for `wp_generate_password()` by noting the use of wp_rand() vs `rand()` or `mt_rand()`. Props webdevmattcrom. Fixes #42782. Built from https://develop.svn.wordpress.org/trunk@42373 git-svn-id: http://core.svn.wordpress.org/trunk@42202 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 5 ++++- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 28c3e43a46..17e3fed1cb 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -2312,6 +2312,9 @@ if ( ! function_exists( 'wp_generate_password' ) ) : /** * Generates a random password drawn from the defined set of characters. * + * Uses wp_rand() is used to create passwords with far less predictability + * than similar native PHP functions like `rand()` or `mt_rand()`. + * * @since 2.5.0 * * @param int $length Optional. The length of password to generate. Default 12. @@ -2348,7 +2351,7 @@ endif; if ( ! function_exists( 'wp_rand' ) ) : /** - * Generates a random number + * Generates a random number. * * @since 2.6.2 * @since 4.4.0 Uses PHP7 random_int() or the random_compat library if available. diff --git a/wp-includes/version.php b/wp-includes/version.php index 1bcb13f6ea..a504442c38 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42368'; +$wp_version = '5.0-alpha-42373'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.