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
This commit is contained in:
Dominik Schilling 2016-08-08 13:14:37 +00:00
parent f6cbf30494
commit c959c32860
2 changed files with 3 additions and 2 deletions

View File

@ -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 ) {

View File

@ -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.