Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: new_admin_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
246       * ###EMAIL###     The new email.
247       * ###SITENAME###  The name of the site.
248       * ###SITEURL###   The URL to the site.
249       *
250       * @since MU
251       *
252       * @param string $email_text      Text in the email.
253       * @param string $new_admin_email New admin email that the current administration email was changed to.
254       */
255      $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email );
256
257      $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content );
258      $content = str_replace( '###EMAIL###', $value, $content );
259      $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
260      $content = str_replace( '###SITEURL###', network_home_url(), $content );
261
262      wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
263 }
264 add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );