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
359            * ###EMAIL###     The new email.
360            * ###SITENAME###  The name of the site.
361            * ###SITEURL###   The URL to the site.
362            *
363            * @since MU
364            *
365            * @param string $email_text     Text in the email.
366            * @param string $new_user_email New user email that the current user has changed to.
367            */
368           $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
369
370           $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
371           $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content );
372           $content = str_replace( '###EMAIL###', $_POST['email'], $content);
373           $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
374           $content = str_replace( '###SITEURL###', network_home_url(), $content );
375
376           wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
377           $_POST['email'] = $current_user->user_email;