From e914c3fb17455e3fe4b27d76a6a7bfa3ccafbea4 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 7 Aug 2016 04:47:51 +0000 Subject: [PATCH] Taxononmy: set `WP_Term_Query::terms` when returning terms from the cache in `WP_Term_Query::get_terms()`. See #37591. git-svn-id: https://develop.svn.wordpress.org/trunk@38212 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-term-query.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php index 565c1e6268..38977f451c 100644 --- a/src/wp-includes/class-wp-term-query.php +++ b/src/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 ) {