首页 WordPress函数大全 metadata_exists()

metadata_exists()

2020-05-02 / 2029阅 / 悠然

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

metadata_exists( string $meta_type, int $object_id, string $meta_key )

确定是否为给定对象设置了元键。

描述

参数

$meta_type

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

$object_id

(int)
(Required)
ID of the object metadata is for.

$meta_key

(string)
(Required)
Metadata key.

返回

(bool) True of the key is set, false if not.

大家谈论
    我的见解