首页 WordPress函数大全 is_term()

is_term()

2020-05-02 / 5218阅 / 悠然

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

警告:此功能已被弃用。请改用term_exists()。

is_term( int|string $term, string $taxonomy = '', int $parent )

检查术语是否存在。

描述

See also See also

  • term_exists()

Top ↑

参数

$term

(int|string)
(Required)
The term to check

$taxonomy

(string)
(Optional)
The taxonomy name to use

Default value: ''

$parent

(int)
(Required)
ID of parent term under which to confine the exists search.

返回

(mixed) Get the term id or Term Object, if exists.

大家谈论
    我的见解