is_term()
最后更新于:2021-11-27 11:46:24
is_term( int|string$term, string$taxonomy=”, int$parent)Check if Term exists.
参数
- $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.
源文件
文件: gc-includes/deprecated.php
function is_term( $term, $taxonomy = '', $parent = 0 ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'term_exists()' );
return term_exists( $term, $taxonomy, $parent );
}