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 |
|---|---|
| 2571 | * For non-custom meta fields, see the {@see 'insert_user_meta'} filter. |
| 2572 | * |
| 2573 | * @since 5.9.0 |
| 2574 | * |
| 2575 | * @param array $custom_meta Array of custom user meta values keyed by meta key. |
| 2576 | * @param WP_User $user User object. |
| 2577 | * @param bool $update Whether the user is being updated rather than created. |
| 2578 | * @param array $userdata The raw array of data passed to wp_insert_user(). |
| 2579 | */ |
| 2580 | $custom_meta = apply_filters( 'insert_custom_user_meta', $custom_meta, $user, $update, $userdata ); |
| 2581 | |
| 2582 | $meta = array_merge( $meta, $custom_meta ); |
| 2583 | |
| 2584 | if ( $update ) { |
| 2585 | // Update user meta. |
| 2586 | foreach ( $meta as $key => $value ) { |
| 2587 | update_user_meta( $user_id, $key, $value ); |
| 2588 | } |
| 2589 | } else { |