is_object_in_taxonomy()
is_object_in_taxonomy( string $object_type, string $taxonomy )
确定给定的对象类型是否与给定的分类法关联。
Determine if the given object type is associated with the given taxonomy.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$object_type | (string) | 必需 | 对象类型字符串。 |
$taxonomy | (string) | 必需 | 单一分类法名称。 |
返回(Return)
(bool)如果对象与分类法关联,则为True,否则为false。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.0.0 | wp-includes/taxonomy.php:4480 | 10 | 1 function |
is_object_in_taxonomy() 为WP2原创文章,链接:https://www.wp2.cn/functions/is_object_in_taxonomy/