首页 WordPress函数大全 registered_meta_key_exists()

registered_meta_key_exists()

2020-05-02 / 2119阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

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

检查是否注册了元密钥。

描述

参数

$object_type

(string)
(Required)
Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.

$meta_key

(string)
(Required)
Metadata key.

$object_subtype

(string)
(Optional)
The subtype of the object type.

Default value: ''

返回

(bool) True if the meta key is registered to the object type and, if provided, the object subtype. False if not.

大家谈论
    我的见解