recovery_mode_email
Filter HookDescription
Filters the contents of the Recovery Mode email. }Hook Information
File Location |
wp-includes/class-wp-recovery-mode-email-service.php
View on GitHub
|
Hook Type | Filter |
Line Number | 223 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$email
|
{ Used to build a call to wp_mail(). |
string
|
$url
|
URL to enter recovery mode. |
Usage Examples
Basic Usage
<?php
// Hook into recovery_mode_email
add_filter('recovery_mode_email', 'my_custom_filter', 10, 2);
function my_custom_filter($email, $url) {
// Your custom filtering logic here
return $email;
}
Source Code Context
wp-includes/class-wp-recovery-mode-email-service.php:223
- How this hook is used in WordPress core
<?php
218 * @type string|array $headers Optional. Additional headers.
219 * @type string|array $attachments Optional. Files to attach.
220 * }
221 * @param string $url URL to enter recovery mode.
222 */
223 $email = apply_filters( 'recovery_mode_email', $email, $url );
224
225 $sent = wp_mail(
226 $email['to'],
227 wp_specialchars_decode( sprintf( $email['subject'], $blogname ) ),
228 $email['message'],
PHP Documentation
<?php
/**
* Filters the contents of the Recovery Mode email.
*
* @since 5.2.0
* @since 5.6.0 The `$email` argument includes the `attachments` key.
*
* @param array $email {
* Used to build a call to wp_mail().
*
* @type string|array $to Array or comma-separated list of email addresses to send message.
* @type string $subject Email subject
* @type string $message Message contents
* @type string|array $headers Optional. Additional headers.
* @type string|array $attachments Optional. Files to attach.
* }
* @param string $url URL to enter recovery mode.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-recovery-mode-email-service.php
Related Hooks
Related hooks will be displayed here in future updates.