diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 6c006fc446..89eba0ba0d 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1559,6 +1559,18 @@ function term_exists( $term, $taxonomy = '', $parent = null ) { $defaults['fields'] = 'all'; } + /** + * Filters default arguments for checking if term exists. + * + * @since 6.0.0 + * + * @param array $defaults An array of arguments for term_exists. + * @param int|string $term The term to check. Accepts term ID, slug, or name. + * @param string $taxonomy The taxonomy name to use. An empty string indicates the search is against all taxonomies. + * @param int|null $parent ID of parent term under which to confine the exists search. Null indicates the search is unconfined. + */ + $defaults = apply_filters( 'term_exists_default_query_args', $defaults, $term, $taxonomy, $parent ); + if ( is_int( $term ) ) { if ( 0 === $term ) { return 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index 50de7f1001..82e7388e2a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52986'; +$wp_version = '6.0-alpha-52987'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.