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 |
|---|---|
| 2240 | * For non-custom meta fields, see the {@see 'insert_user_meta'} filter. |
| 2241 | * |
| 2242 | * @since 5.9.0 |
| 2243 | * |
| 2244 | * @param array $custom_meta Array of custom user meta values keyed by meta key. |
| 2245 | * @param WP_User $user User object. |
| 2246 | * @param bool $update Whether the user is being updated rather than created. |
| 2247 | * @param array $userdata The raw array of data passed to wp_insert_user(). |
| 2248 | */ |
| 2249 | $custom_meta = apply_filters( 'insert_custom_user_meta', $custom_meta, $user, $update, $userdata ); |
| 2250 | |
| 2251 | $meta = array_merge( $meta, $custom_meta ); |
| 2252 | |
| 2253 | // Update user meta. |
| 2254 | foreach ( $meta as $key => $value ) { |
| 2255 | update_user_meta( $user_id, $key, $value ); |
| 2256 | } |
| 2257 | |
| 2258 | foreach ( wp_get_user_contact_methods( $user ) as $key => $value ) { |