From 9143e2c860270f743c29d7c85cc47a084bb0e8af Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 20 Aug 2012 23:43:04 +0000 Subject: [PATCH] Return a variable reference from get_pages(). see [21559], see #21309, fixes #20756. git-svn-id: https://develop.svn.wordpress.org/trunk@21567 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 529a1cbc21..31e937c2f6 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3520,8 +3520,8 @@ function &get_pages($args = '') { if ( is_array($cache) && isset( $cache[ $key ] ) ) { // Convert to WP_Post instances $pages = array_map( 'get_post', $cache[ $key ] ); - - return apply_filters( 'get_pages', $pages, $r ); + $pages = apply_filters( 'get_pages', $pages, $r ); + return $pages; } }