Warning: This function has been deprecated. Use term_exists() instead.

is_term() WordPress Function

The is_term() function checks if a given term exists. It accepts two parameters: 1. The term to check 2. The taxonomy to check against If the term exists, the function returns true. Otherwise, it returns false.

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

Check if Term exists.


Description

Top ↑

See also


Top ↑

Parameters

$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.


Top ↑

Return

(mixed) Get the term ID or term object, if exists.


Top ↑

Source

File: wp-includes/deprecated.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Use term_exists()
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More