WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
290 | * ###EMAIL### The new email. |
291 | * ###SITENAME### The name of the site. |
292 | * ###SITEURL### The URL to the site. |
293 | * |
294 | * @since MU |
295 | * |
296 | * @param string $email_text Text in the email. |
297 | * @param string $new_admin_email New admin email that the current administration email was changed to. |
298 | */ |
299 | $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); |
300 |
|
301 | $current_user = wp_get_current_user(); |
302 | $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); |
303 | $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); |
304 | $content = str_replace( '###EMAIL###', $value, $content ); |
305 | $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content ); |
306 | $content = str_replace( '###SITEURL###', network_home_url(), $content ); |
307 |
|
308 | wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content ); |