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 | 
|---|---|
| 2348 |       *     @type string $user_nicename   The user's nice name. Defaults to a URL-safe version of user's login | 
| 2349 |       *     @type string $display_name    The user's display name. | 
| 2350 |       *     @type string $user_registered MySQL timestamp describing the moment when the user registered. Defaults to | 
| 2351 |       *                                   the current UTC timestamp. | 
| 2352 |       * } | 
| 2353 |       * @param bool     $update   Whether the user is being updated rather than created. | 
| 2354 |       * @param int|null $user_id  ID of the user to be updated, or NULL if the user is being created. | 
| 2355 |       * @param array    $userdata The raw array of data passed to wp_insert_user(). | 
| 2356 |       */ | 
| 2357 |      $data = apply_filters( 'wp_pre_insert_user_data', $data, $update, ( $update ? $user_id : null ), $userdata ); | 
| 2358 |  | 
| 2359 |      if ( empty( $data ) || ! is_array( $data ) ) { | 
| 2360 |           return new WP_Error( 'empty_data', __( 'Not enough data to create this user.' ) ); | 
| 2361 |      } | 
| 2362 |  | 
| 2363 |      if ( $update ) { | 
| 2364 |           if ( $user_email !== $old_user_data->user_email || $user_pass !== $old_user_data->user_pass ) { | 
| 2365 |                $data['user_activation_key'] = ''; | 
| 2366 |           } |