is_term

函数


is_term ( $term, $taxonomy = '', $parent = 0 )
参数
  • (int|string)
    $term
    The term to check
    Required:
  • (string)
    $taxonomy
    The taxonomy name to use
    Required:
    Default: (empty)
  • (int)
    $parent
    ID of parent term under which to confine the exists search.
    Required:
返回值
  • (mixed) Get the term ID or term object, if exists.
相关
  • term_exists()
定义位置
  • wp-includes/deprecated.php
    , line 2511
引入
2.3.0
弃用
3.0.0

Check if Term exists.

function is_term( $term, $taxonomy = '', $parent = 0 ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'term_exists()' );
	return term_exists( $term, $taxonomy, $parent );
}