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.


Top ↑

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().


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More