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 |
---|---|
2108 |
|
2109 | /** |
2110 | * Filters whether the admin is notified of a new user registration. |
2111 | * |
2112 | * @since 6.1.0 |
2113 | * |
2114 | * @param bool $send Whether to send the email. Default true. |
2115 | * @param WP_User $user User object for new user. |
2116 | */ |
2117 | $send_notification_to_admin = apply_filters( 'wp_send_new_user_notification_to_admin', true, $user ); |
2118 |
|
2119 | if ( 'user' !== $notify && true === $send_notification_to_admin ) { |
2120 | $switched_locale = switch_to_locale( get_locale() ); |
2121 |
|
2122 | /* translators: %s: Site title. */ |
2123 | $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n"; |
2124 | /* translators: %s: User login. */ |
2125 | $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; |
2126 | /* translators: %s: User email address. */ |