Skip to content

Commit

Permalink
Docs: Document the $wp_hasher global in `wp_generate_user_request_k…
Browse files Browse the repository at this point in the history
…ey()`.

Includes adding a description for the global in a few other functions.

Follow-up to [42791], [42964], [43008].

Props viralsampat.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57226


git-svn-id: http://core.svn.wordpress.org/trunk@56732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed Dec 24, 2023
1 parent 9b09f2c commit 356dd51
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions wp-includes/class-wp-recovery-mode-key-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function generate_recovery_mode_token() {
*
* @since 5.2.0
*
* @global PasswordHash $wp_hasher
* @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
*
* @param string $token A token generated by {@see generate_recovery_mode_token()}.
* @return string Recovery mode key.
Expand Down Expand Up @@ -85,7 +85,7 @@ public function generate_and_store_recovery_mode_key( $token ) {
*
* @since 5.2.0
*
* @global PasswordHash $wp_hasher
* @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
*
* @param string $token The token used when generating the given key.
* @param string $key The unhashed key.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ function wp_hash( $data, $scheme = 'auth' ) {
*
* @since 2.5.0
*
* @global PasswordHash $wp_hasher PHPass object
* @global PasswordHash $wp_hasher PHPass object.
*
* @param string $password Plain text user password to hash.
* @return string The hash string of the password.
Expand Down
10 changes: 7 additions & 3 deletions wp-includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,7 @@ function wp_get_password_hint() {
*
* @since 4.4.0
*
* @global PasswordHash $wp_hasher Portable PHP password hashing framework.
* @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
*
* @param WP_User $user User to retrieve password reset key for.
* @return string|WP_Error Password reset key on success. WP_Error on error.
Expand Down Expand Up @@ -3047,8 +3047,8 @@ function check_password_reset_key( $key, $login ) {
* @since 2.5.0
* @since 5.7.0 Added `$user_login` parameter.
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global PasswordHash $wp_hasher Portable PHP password hashing framework.
* @global wpdb $wpdb WordPress database abstraction object.
* @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
*
* @param string $user_login Optional. Username to send a password retrieval email for.
* Defaults to `$_POST['user_login']` if not set.
Expand Down Expand Up @@ -4817,6 +4817,8 @@ function wp_send_user_request( $request_id ) {
*
* @since 4.9.6
*
* @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
*
* @param int $request_id Request ID.
* @return string Confirmation key.
*/
Expand Down Expand Up @@ -4848,6 +4850,8 @@ function wp_generate_user_request_key( $request_id ) {
*
* @since 4.9.6
*
* @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
*
* @param string $request_id ID of the request being confirmed.
* @param string $key Provided key to validate.
* @return true|WP_Error True on success, WP_Error on failure.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57225';
$wp_version = '6.5-alpha-57226';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 356dd51

Please sign in to comment.