W3cubDocs

/WordPress

apply_filters( ‘term_exists_default_query_args’, array $defaults, int|string $term, string $taxonomy, int|null $parent_term )

Filters default query arguments for checking if a term exists.

Parameters

$defaultsarray
An array of arguments passed to get_terms() .
More Arguments from get_terms( … $args )Array or string of arguments. See WP_Term_Query::__construct() for information on accepted arguments.
$termint|string
The term to check. Accepts term ID, slug, or name.
$taxonomystring
The taxonomy name to use. An empty string indicates the search is against all taxonomies.
$parent_termint|null
ID of parent term under which to confine the exists search.
Null indicates the search is unconfined.

Source

$defaults = apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent_term );

Changelog

Version Description
6.0.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/term_exists_default_query_args