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