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 |
---|---|
2121 |
|
2122 | /** |
2123 | * Filters whether the admin is notified of a new user registration. |
2124 | * |
2125 | * @since 6.1.0 |
2126 | * |
2127 | * @param bool $send Whether to send the email. Default true. |
2128 | * @param WP_User $user User object for new user. |
2129 | */ |
2130 | $send_notification_to_admin = apply_filters( 'wp_send_new_user_notification_to_admin', true, $user ); |
2131 |
|
2132 | if ( 'user' !== $notify && true === $send_notification_to_admin ) { |
2133 | $switched_locale = switch_to_locale( get_locale() ); |
2134 |
|
2135 | /* translators: %s: Site title. */ |
2136 | $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n"; |
2137 | /* translators: %s: User login. */ |
2138 | $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; |
2139 | /* translators: %s: User email address. */ |