is_protected_meta
apply_filters( ‘is_protected_meta’, bool $protected , string $meta_key , string $meta_type )
过滤钩子:过滤一个元键是否被认为是受保护的。
Filter Hook: Filters whether a meta key is considered protected.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$protected | (bool) | 密钥是否被视为受保护。 |
$meta_key | (string) | 元数据键。 |
$meta_type | (string) | 对象元数据的类型是。接受“post”、“comment”、“term”、“user”或任何其他具有关联元表的对象类型。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.2.0 | wp-includes/meta.php:1060 | 1 | 0 |
笔记(Notes)
要设置为受保护的两个元字段的示例:
is_protected_meta 为WP2原创文章,链接:https://www.wp2.cn/hook/is_protected_meta-2/