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 |
---|---|
2383 | * is not forced. |
2384 | * @type string $show_admin_bar_front Whether to show the admin bar on the front end for the user. |
2385 | * Default 'true'. |
2386 | * @type string $locale User's locale. Default empty. |
2387 | * } |
2388 | * @param WP_User $user User object. |
2389 | * @param bool $update Whether the user is being updated rather than created. |
2390 | * @param array $userdata The raw array of data passed to wp_insert_user(). |
2391 | */ |
2392 | $meta = apply_filters( 'insert_user_meta', $meta, $user, $update, $userdata ); |
2393 |
|
2394 | $custom_meta = array(); |
2395 | if ( array_key_exists( 'meta_input', $userdata ) && is_array( $userdata['meta_input'] ) && ! empty( $userdata['meta_input'] ) ) { |
2396 | $custom_meta = $userdata['meta_input']; |
2397 | } |
2398 |
|
2399 | /** |
2400 | * Filters a user's custom meta values and keys immediately after the user is created or updated |
2401 | * and before any user meta is inserted or updated. |