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 |
|---|---|
| 2166 | |
| 2167 | /** |
| 2168 | * Filters whether the user is notified of their new user registration. |
| 2169 | * |
| 2170 | * @since 6.1.0 |
| 2171 | * |
| 2172 | * @param bool $send Whether to send the email. Default true. |
| 2173 | * @param WP_User $user User object for new user. |
| 2174 | */ |
| 2175 | $send_notification_to_user = apply_filters( 'wp_send_new_user_notification_to_user', true, $user ); |
| 2176 | |
| 2177 | // `$deprecated` was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notification. |
| 2178 | if ( 'admin' === $notify || true !== $send_notification_to_user || ( empty( $deprecated ) && empty( $notify ) ) ) { |
| 2179 | return; |
| 2180 | } |
| 2181 | |
| 2182 | $key = get_password_reset_key( $user ); |
| 2183 | if ( is_wp_error( $key ) ) { |
| 2184 | return; |