From c959c32860c3b12852bc62af6a356bd383d8e1b7 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 8 Aug 2016 13:14:37 +0000 Subject: [PATCH] Taxononmy: Set `WP_Term_Query::terms` when returning terms from the cache in `WP_Term_Query::get_terms()`. Merge of [38211] and [38212] to the 4.6 branch. Props wonderboymusic. Props boonebgorges for review. Fixes #37591. Built from https://develop.svn.wordpress.org/branches/4.6@38214 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38155 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-term-query.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php index 565c1e6268..38977f451c 100644 --- a/wp-includes/class-wp-term-query.php +++ b/wp-includes/class-wp-term-query.php @@ -641,7 +641,8 @@ class WP_Term_Query { $cache = array_map( 'get_term', $cache ); } - return $cache; + $this->terms = $cache; + return $this->terms; } if ( 'count' == $_fields ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index a8d0339369..63ef809ced 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-RC1-38210'; +$wp_version = '4.6-RC1-38214'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.