WordPress как на ладони
wordpress jino
фильтр не описан

insert_user_meta хук-фильтр . WP 4.4.0

Filters a user's meta values and keys immediately after the user is created or updated and before any user meta is inserted or updated.

Does not include contact methods. These are added using wp_get_user_contact_methods($user).

Использование

add_filter( 'insert_user_meta', 'filter_function_name_6617', 10, 3 );
function filter_function_name_6617( $meta, $user, $update ){
	// filter...

	return $meta;
}
$meta(array)

{ Default meta values and keys for the user.

@type string $nickname The user's nickname. @type string $first_name The user's first name. @type string $last_name The user's last name. @type string $description The user's description. @type bool $rich_editing Whether to enable the rich-editor for the user. False if not empty. @type bool $syntax_highlighting Whether to enable the rich code editor for the user. False if not empty. @type bool $comment_shortcuts Whether to enable keyboard shortcuts for the user. Default false. @type string $admin_color The color scheme for a user's admin screen. Default 'fresh'. @type int|bool $use_ssl Whether to force SSL on the user's admin area. 0|false if SSL is not forced. @type bool $show_admin_bar_front Whether to show the admin bar on the front end for the user. Default true. }
Default: is the user's username

$user(WP_User)
User object.
$update(bool)
Whether the user is being updated rather than created.

Связи хука

Используется в: wp_insert_user()

Остальные хуки из: wp_insert_user():

Кусок кода с хуком

Фрагмент из: wp-includes/user.php VER 4.9.1
...
	 *     @type string   $first_name           The user's first name.
	 *     @type string   $last_name            The user's last name.
	 *     @type string   $description          The user's description.
	 *     @type bool     $rich_editing         Whether to enable the rich-editor for the user. False if not empty.
	 *     @type bool     $syntax_highlighting  Whether to enable the rich code editor for the user. False if not empty.
	 *     @type bool     $comment_shortcuts    Whether to enable keyboard shortcuts for the user. Default false.
	 *     @type string   $admin_color          The color scheme for a user's admin screen. Default 'fresh'.
	 *     @type int|bool $use_ssl              Whether to force SSL on the user's admin area. 0|false if SSL is
	 *                                          not forced.
	 *     @type bool     $show_admin_bar_front Whether to show the admin bar on the front end for the user.
	 *                                          Default true.
 	 * }
	 * @param WP_User $user   User object.
	 * @param bool    $update Whether the user is being updated rather than created.
 	 */
	$meta = apply_filters( 'insert_user_meta', $meta, $user, $update );

	// Update user meta.
	foreach ( $meta as $key => $value ) {
		update_user_meta( $user_id, $key, $value );
	}

	foreach ( wp_get_user_contact_methods( $user ) as $key => $value ) {
		if ( isset( $userdata[ $key ] ) ) {
			update_user_meta( $user_id, $key, $userdata[ $key ] );
		}
	}

	if ( isset( $userdata['role'] ) ) {
		$user->set_role( $userdata['role'] );
	} elseif ( ! $update ) {
...