Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: new_user_email_content

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2795            *
2796            * @param string $email_text     Text in the email.
2797            * @param array  $new_user_email {
2798            *     Data relating to the new user email address.
2799            *
2800            *     @type string $hash     The secure hash used in the confirmation link URL.
2801            *     @type string $newemail The proposed new email address.
2802            * }
2803            */
2804           $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
2805
2806           $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
2807           $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
2808           $content = str_replace( '###EMAIL###', $_POST['email'], $content );
2809           $content = str_replace( '###SITENAME###', $sitename, $content );
2810           $content = str_replace( '###SITEURL###', home_url(), $content );
2811
2812           /* translators: New email address notification email subject. %s: Site name */
2813           wp_mail( $_POST['email'], sprintf( __( '[%s] Email Change Request' ), $sitename ), $content );