diff -r 48c4eec2b7e6 -r 8c2e4d02f4ef wp/wp-includes/class-wp-term-query.php --- a/wp/wp-includes/class-wp-term-query.php Fri Sep 05 18:40:08 2025 +0200 +++ b/wp/wp-includes/class-wp-term-query.php Fri Sep 05 18:52:52 2025 +0200 @@ -148,8 +148,6 @@ * - 'id=>slug' Returns an associative array of term slugs, * keyed by term ID (`string[]`). * Default 'all'. - * @type bool $count Whether to return a term count. If true, will take precedence - * over `$fields`. Default false. * @type string|string[] $name Name or array of names to return term(s) for. * Default empty. * @type string|string[] $slug Slug or array of slugs to return term(s) for. @@ -208,7 +206,6 @@ 'number' => '', 'offset' => '', 'fields' => 'all', - 'count' => false, 'name' => '', 'slug' => '', 'term_taxonomy_id' => '', @@ -304,7 +301,7 @@ * * @param string|array $query Array or URL query string of parameters. * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string - * when 'count' is passed as a query var. + * when 'count' is passed to `$args['fields']`. */ public function query( $query ) { $this->query_vars = wp_parse_args( $query ); @@ -346,7 +343,7 @@ * @global wpdb $wpdb WordPress database abstraction object. * * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string - * when 'count' is passed as a query var. + * when 'count' is passed to `$args['fields']`. */ public function get_terms() { global $wpdb; @@ -1170,12 +1167,11 @@ if ( 'count' !== $args['fields'] && 'all_with_object_id' !== $args['fields'] ) { $cache_args['fields'] = 'all'; } - $taxonomies = (array) $args['taxonomy']; // Replace wpdb placeholder in the SQL statement used by the cache key. $sql = $wpdb->remove_placeholder_escape( $sql ); - $key = md5( serialize( $cache_args ) . serialize( $taxonomies ) . $sql ); + $key = md5( serialize( $cache_args ) . $sql ); $last_changed = wp_cache_get_last_changed( 'terms' ); return "get_terms:$key:$last_changed"; }