wpmu_signup_user_notification_email
Filters the content of the notification email for new user sign-up.
Content should be formatted for transmission via wp_mail().
Использование
add_filter( 'wpmu_signup_user_notification_email', 'wp_kama_wpmu_signup_user_notification_email_filter', 10, 5 ); /** * Function for `wpmu_signup_user_notification_email` filter-hook. * * @param string $content Content of the notification email. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_user(). * @param array $meta Signup meta data. * * @return string */ function wp_kama_wpmu_signup_user_notification_email_filter( $content, $user_login, $user_email, $key, $meta ){ // filter... return $content; }
- $content(строка)
- Content of the notification email.
- $user_login(строка)
- User login name.
- $user_email(строка)
- User email address.
- $key(строка)
- Activation key created in wpmu_signup_user().
- $meta(массив)
- Signup meta data.
По умолчанию: empty array
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
wpmu_signup_user_notification_email
wp-includes/ms-functions.php 1101-1109
apply_filters( 'wpmu_signup_user_notification_email', /* translators: New user notification email. %s: Activation URL. */ __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login." ), $user_login, $user_email, $key, $meta ),
Где используется хук в WordPress
wp-admin/user-new.php 29
add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );