From 57e5e7fd79348772ef158101c8651401ce71f947 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 4 Jun 2016 12:20:28 +0000 Subject: [PATCH] Taxonomy: No, really, don't pass results of 'count' query through 'get_terms' filter. [37623] used the wrong parameter name (count=true instead of fields=count). For greater flexibility and forward compatibility with other potential changes to the return value of `get_terms()`, we now do a looser check: any non-array value is excluded from the filter. Fixes #36992. Built from https://develop.svn.wordpress.org/trunk@37634 git-svn-id: http://core.svn.wordpress.org/trunk@37602 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 534a9de4f1..47633d1f02 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1209,7 +1209,7 @@ function get_terms( $args = array(), $deprecated = '' ) { $terms = $term_query->query( $args ); // Count queries are not filtered, for legacy reasons. - if ( $term_query->query_vars['count'] ) { + if ( ! is_array( $terms ) ) { return $terms; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 7cccedd16e..52fa6d1ff7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37633'; +$wp_version = '4.6-alpha-37634'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.