term_exists ( $term, $taxonomy = '', $parent = null )
- (int|string) $term The term to check. Accepts term ID, slug, or name.
- (string) $taxonomy The taxonomy name to use
- (int) $parent Optional. ID of parent term under which to confine the exists search.
- (mixed) Returns null if the term does not exist. Returns the term ID if no taxonomy is specified and the term ID exists. Returns an array of the term ID and the term taxonomy ID the taxonomy is specified and the pairing exists.
- Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Check if Term exists.
Formerly is_term(), introduced in 2.3.0.