1. 首页
  2. WordPress 函数手册

registered_meta_key_exists()

registered_meta_key_exists( string $object_type, string $meta_key, string $object_subtype =  )

检查是否注册了元密钥。
Checks if a meta key is registered.

目录锚点:#参数#返回#源码


参数(Parameters)

参数 类型 必填 说明
$object_type (string) 必需 对象元数据的类型是。接受“post”、“comment”、“term”、“user”或任何其他具有关联元表的对象类型。
$meta_key (string) 必需 元数据键。
$object_subtype (string) 可选 对象类型的子类型。

返回(Return)

(bool)如果元键注册到对象类型,并且如果提供了对象子类型,则为True。如果不是,就错了。


源码(Source)


更新版本 源码位置 使用 被使用
4.9.8 wp-includes/meta.php:1269 2 1 function

registered_meta_key_exists() 为WP2原创文章,链接:https://www.wp2.cn/functions/registered_meta_key_exists/