auth_post_{$post_type}_meta_{$meta_key}
apply_filters( “auth_post_{$post_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)
hook name、$meta_key和$post_type的动态部分分别引用传递给map_meta_cap()和post type的meta key。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$allowed | (bool) | 用户是否可以添加post元。默认为false。 |
$meta_key | (string) | 元密钥。 |
$post_id | (int) | 邮政编码。 |
$user_id | (int) | 用户ID。 |
$cap | (string) | 能力名称。 |
$caps | (array) | 用户能力。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.6.0 | wp-includes/capabilities.php:285 | 0 | 0 |
auth_post_{$post_type}_meta_{$meta_key} 为WP2原创文章,链接:https://www.wp2.cn/hook/auth_post_post_type_meta_meta_key/