auth_{$object_type}_{$sub_type}_meta_{$meta_key}
apply_filters( “auth_{$object_type}_{$sub_type}_meta_{$meta_key}”, bool $allowed , string $meta_key , int $post_id , int $user_id , string $cap , array $caps )
过滤器::过滤是否允许用户将post meta添加到给定类型的post。
Filter Hook: Filters whether the user is allowed to add post meta to a post of a given type.
说明(Description)
使用auth_$object_utype_$sub_utype_umeta_$meta_键过滤器修改特定对象类型/子类型的功能。返回true以应用edit{$object{u type}中的映射元大写。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$allowed | (bool) | 用户是否可以添加post元。默认为false。 |
$meta_key | (string) | 元密钥。 |
$post_id | (int) | 邮政编码。 |
$user_id | (int) | 用户ID。 |
$cap | (string) | 能力名称。 |
$caps | (array) | 用户能力。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/capabilities.php:353 | 0 | 0 |
auth_{$object_type}_{$sub_type}_meta_{$meta_key} 为WP2原创文章,链接:https://www.wp2.cn/hook/auth_object_type_sub_type_meta_meta_key/