insert_custom_user_meta WordPress Filter Hook
The insert_custom_user_meta hook is used to insert custom user meta into the WordPress database. This hook is called when a user is created or updated.
apply_filters( 'insert_custom_user_meta', array $custom_meta , WP_User $user , bool $update , array $userdata ) #
Filters a user’s custom meta values and keys immediately after the user is created or updated and before any user meta is inserted or updated.
Description
For non-custom meta fields, see the ‘insert_user_meta’ filter.
Parameters
- $custom_meta
(array)Array of custom user meta values keyed by meta key.
- $user
(WP_User)User object.
- $update
(bool)Whether the user is being updated rather than created.
- $userdata
(array)The raw array of data passed to wp_insert_user().
Source
File: wp-includes/user.php
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |