is_textdomain_loaded

Definition:
function is_textdomain_loaded( $domain ) {}

Whether there are translations for the domain

Parameters

  • string $domain

Return values

returns:Whether there are translations

Source code

function is_textdomain_loaded( $domain ) {

	global $l10n;

	return isset( $l10n[$domain] );

}

2209

is_term

Definition:
function is_term( $term, $taxonomy = '', $parent = 0 ) {}

Check if Term exists.

Parameters

  • int|string $term: The term to check
  • string $taxonomy: The taxonomy name to use
  • int $parent: ID of parent term under which to confine the exists search.

Return values

returns:Get the term id or Term Object, if exists.

Source code

function is_term( $term, $taxonomy = '', $parent = 0 ) {

	_deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );

	return term_exists( $term, $taxonomy, $parent );

}

2207

is_taxonomy_hierarchical

Definition:
function is_taxonomy_hierarchical($taxonomy) {}

Whether the taxonomy object is hierarchical.
Checks to make sure that the taxonomy is an object first. Then Gets the object, and finally returns the hierarchical value in the object.

Parameters

  • string $taxonomy: Name of taxonomy object

Return values

returns:Whether the taxonomy is hierarchical

Source code

function is_taxonomy_hierarchical($taxonomy) {

	if ( ! taxonomy_exists($taxonomy) )

		return false;



	$taxonomy = get_taxonomy($taxonomy);

	return $taxonomy->hierarchical;

}

2205

is_taxonomy

Definition:
function is_taxonomy( $taxonomy ) {}

Checks that the taxonomy name exists.

Parameters

  • string $taxonomy: Name of taxonomy object

Return values

returns:Whether the taxonomy exists.

Source code

function is_taxonomy( $taxonomy ) {

	_deprecated_function( __FUNCTION__, '3.0', 'taxonomy_exists()' );

	return taxonomy_exists( $taxonomy );

}

2203

is_tax

Definition:
function is_tax( $taxonomy = '', $term = '' ) {}

Is the query for a taxonomy archive page?
If the $taxonomy parameter is specified, this function will additionally check if the query is for that specific $taxonomy.

Parameters

  • mixed $taxonomy: Optional. Taxonomy slug or slugs.
  • mixed $term: Optional. Term ID, name, slug or array of Term IDs, names, and slugs.

Source code

	function is_tax( $taxonomy = '', $term = '' ) {

		global $wp_taxonomies;



		if ( !$this->is_tax )

			return false;



		if ( empty( $taxonomy ) )

			return true;



		$queried_object = $this->get_queried_object();

		$tax_array = array_intersect( array_keys( $wp_taxonomies ), (array) $taxonomy );

		$term_array = (array) $term;



		if ( empty( $term ) ) // Only a Taxonomy provided

			return isset( $queried_object->taxonomy ) && count( $tax_array ) && in_array( $queried_object->taxonomy, $tax_array );



		return isset( $queried_object->term_id ) &&

			count( array_intersect(

				array( $queried_object->term_id, $queried_object->name, $queried_object->slug ),

				$term_array

			) );

	}

2201