insert_custom_user_meta

过滤钩子


apply_filters( 'insert_custom_user_meta', $custom_meta, $user, $update, $userdata )
参数
  • (array)
    $custom_meta
    Array of custom user meta values keyed by meta key.
    Required:
  • (WP_User)
    $user
    User object.
    Required:
  • (bool)
    $update
    Whether the user is being updated rather than created.
    Required:
  • (array)
    $userdata
    The raw array of data passed to wp_insert_user().
    Required:
定义位置
  • wp-includes/user.php
    , line 2412
引入
5.9.0
弃用

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.

For non-custom meta fields, see the {@see ‘insert_user_meta’} filter.

$custom_meta = apply_filters( 'insert_custom_user_meta', $custom_meta, $user, $update, $userdata );