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 );
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。