Users: Add an action hook on `wp_set_password()`.
This changeset introduces the `wp_set_password` action hook, triggered after a password is set for a given user. As several plugins are calling `wp_set_password()` directly, adding an action to the end of the function will help plugin authors to catch all instances of password setting. Props tanner-m, audrasjb. Fixes #57436. Built from https://develop.svn.wordpress.org/trunk@55056 git-svn-id: http://core.svn.wordpress.org/trunk@54589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2c0a6fefae
commit
00ed89ffb1
|
@ -2740,6 +2740,16 @@ if ( ! function_exists( 'wp_set_password' ) ) :
|
|||
);
|
||||
|
||||
clean_user_cache( $user_id );
|
||||
|
||||
/**
|
||||
* Fires after the password is set.
|
||||
*
|
||||
* @since 6.2.0
|
||||
*
|
||||
* @param string $password The plain text password just set.
|
||||
* @param mixed $user_id The ID of the user whose password was just set.
|
||||
*/
|
||||
do_action( 'wp_set_password', $password, $user_id );
|
||||
}
|
||||
endif;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.2-alpha-55055';
|
||||
$wp_version = '6.2-alpha-55056';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue