mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Docs: Further update the send_retrieve_password_email filter documentation for consistency.
Follow-up to [52604], [52605]. See #54690. git-svn-id: https://develop.svn.wordpress.org/trunk@52606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2941,9 +2941,11 @@ function retrieve_password( $user_login = null ) {
|
||||
/**
|
||||
* Filters whether to send the retrieve password email.
|
||||
*
|
||||
* Return false to disable sending the email.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param bool $send False to prevent sending. Default true.
|
||||
* @param bool $send Whether to send the email.
|
||||
*/
|
||||
if ( ! apply_filters( 'send_retrieve_password_email', true ) ) {
|
||||
return true;
|
||||
@@ -3043,7 +3045,7 @@ function retrieve_password( $user_login = null ) {
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $defaults {
|
||||
* @param array $notification_email {
|
||||
* The default notification email arguments. Used to build wp_mail().
|
||||
*
|
||||
* @type string $to The intended recipient - user email address.
|
||||
@@ -3059,7 +3061,7 @@ function retrieve_password( $user_login = null ) {
|
||||
* @type WP_User $user_data WP_User object.
|
||||
* }
|
||||
*/
|
||||
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $data );
|
||||
$notification_email = apply_filters( 'retrieve_password_notification_email', $notification_email, $data );
|
||||
|
||||
if ( $switched_locale ) {
|
||||
restore_previous_locale();
|
||||
|
||||
@@ -42,7 +42,8 @@ class Tests_User_RetrievePassword extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* The function should error when the email was not sent.
|
||||
* The function should not error when the email was sent.
|
||||
*
|
||||
* @ticket 54690
|
||||
*/
|
||||
public function test_retrieve_password_reset_notification_email() {
|
||||
@@ -52,6 +53,7 @@ class Tests_User_RetrievePassword extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* The function should error when the email was not sent.
|
||||
*
|
||||
* @ticket 54690
|
||||
*/
|
||||
public function test_retrieve_password_should_return_wp_error_on_failed_email() {
|
||||
|
||||
Reference in New Issue
Block a user