Dans class-wp-recovery-mode-email-service.php
$email = apply_filters( 'recovery_mode_email', $email, $url );
$sent = wp_mail(
$email['to'],
wp_specialchars_decode( sprintf( $email['subject'], $blogname ) ),
$email['message'],
$email['headers']
);
if ( $switched_locale ) {
restore_previous_locale();
}
return $sent;
}
/**
* Gets the email address to send the recovery mode link to.
*
* @since 5.2.0
*
* @return string Email address to send recovery mode link to.
*/
private function get_recovery_mode_email_address() {
if ( defined( 'RECOVERY_MODE_EMAIL' ) && is_email( RECOVERY_MODE_EMAIL ) ) {
return RECOVERY_MODE_EMAIL;
}
return get_option( 'admin_email' );
}
On peut le définir dans WP_CONFIG.PHP
ou dans le theme :
add_filter( 'recovery_mode_email', function( $email_data ) {
$email_data['to'] = 'user@example.com';
return $email_data;
});
Laisser un commentaire