recovery_mode_email
Filters the contents of the Recovery Mode email.
Usage
add_filter( 'recovery_mode_email', 'wp_kama_recovery_mode_email_filter', 10, 2 ); /** * Function for `recovery_mode_email` filter-hook. * * @param array $email Used to build a call to wp_mail(). * @param string $url URL to enter recovery mode. * * @return array */ function wp_kama_recovery_mode_email_filter( $email, $url ){ // filter... return $email; }
- $email(array)
Used to build a call to wp_mail().
-
to(string|array)
Array or comma-separated list of email addresses to send message. -
subject(string)
Email subject -
message(string)
Message contents -
headers(string|array)
Optional. Additional headers. - attachments(string|array)
Optional. Files to attach.
-
- $url(string)
- URL to enter recovery mode.
Changelog
Since 5.2.0 | Introduced. |
Since 5.6.0 | The $email argument includes the attachments key. |
Where the hook is called
wp-includes/class-wp-recovery-mode-email-service.php 223
$email = apply_filters( 'recovery_mode_email', $email, $url );