term_exists_default_query_args WordPress Filter Hook

The term_exists_default_query_args hook allows you to modify the default arguments used when checking if a term exists. This can be useful if you need to change the way the check is performed, for example to check against a custom taxonomy.

apply_filters( 'term_exists_default_query_args', array $defaults, int|string $term, string $taxonomy, int|null $parent ) #

Filters default query arguments for checking if a term exists.


Parameters

$defaults

(array)An array of arguments passed to get_terms().

$term

(int|string)The term to check. Accepts term ID, slug, or name.

$taxonomy

(string)The taxonomy name to use. An empty string indicates the search is against all taxonomies.

$parent

(int|null)ID of parent term under which to confine the exists search. Null indicates the search is unconfined.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
6.0.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
Show More