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.
-
Список изменений
С версии 2.2.0 | Введена. |
Где вызывается хук
wp_mail
wp-includes/pluggable.php 192
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
Где используется хук в WordPress
wp-includes/default-filters.php 267
add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );