wp_mail
Filters the wp_mail() arguments.
Использование
add_filter( 'wp_mail', 'wp_kama_mail_filter' );
/**
* Function for `wp_mail` filter-hook.
*
* @param array $args Array of the `wp_mail()` arguments.
*
* @return array
*/
function wp_kama_mail_filter( $args ){
// filter...
return $args;
}
- $args(массив)
Array of the
wp_mail()arguments.-
to(строка|string[])
Array or comma-separated list of email addresses to send message. -
subject(строка)
Email subject. -
message(строка)
Message contents. -
headers(строка|string[])
Additional headers. -
attachments(строка|string[])
Paths to files to attach. - embeds(строка|string[])
Paths to files to embed.
-
Список изменений
| С версии 2.2.0 | Введена. |
Где вызывается хук
wp_mail
wp-includes/pluggable.php 208
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments', 'embeds' ) );
Где используется хук в WordPress
wp-includes/default-filters.php 274
add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );