recovery_mode_email
Filters the contents of the Recovery Mode email.
Использование
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(массив)
Used to build a call to wp_mail().
-
to(строка|массив)
Array or comma-separated list of email addresses to send message. -
subject(строка)
Email subject -
message(строка)
Message contents -
headers(строка|массив)
Optional. Additional headers. - attachments(строка|массив)
Optional. Files to attach.
-
- $url(строка)
- URL to enter recovery mode.
Список изменений
| С версии 5.2.0 | Введена. |
| С версии 5.6.0 | The $email argument includes the attachments key. |
Где вызывается хук
wp-includes/class-wp-recovery-mode-email-service.php 223
$email = apply_filters( 'recovery_mode_email', $email, $url );