From 207ca8ce444d87dfb3f2f067ffac4b4a1492309c Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 28 Feb 2012 20:37:47 +0000 Subject: [PATCH] Return to apply_filters_ref_array() for back compat with callbacks that specify a ref for the args. Props scribu. see #18536 git-svn-id: http://svn.automattic.com/wordpress/trunk@20024 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 4174246e83..c621470a53 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2609,7 +2609,7 @@ class WP_Query { $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; if ( !$q['suppress_filters'] ) { - $this->request = apply_filters( 'posts_request', $this->request, $this ); + $this->request = apply_filters_ref_array( 'posts_request', array( $this->request, &$this ) ); } if ( 'ids' == $q['fields'] ) { @@ -2777,8 +2777,8 @@ class WP_Query { if ( $q['no_found_rows'] || empty( $limits ) ) return; - $this->found_posts = $wpdb->get_var( apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()', $this ) ); - $this->found_posts = apply_filters( 'found_posts', $this->found_posts, $this ); + $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) ); + $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); $this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] ); }