From ab845b0000e7f5078a7728053a408671c099038f Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 17 Nov 2007 00:04:19 +0000 Subject: [PATCH] Move posts_selection action to after post_limits filter. git-svn-id: http://svn.automattic.com/wordpress/trunk@6338 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 48d25ab7c..5e4e56d1d 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1230,9 +1230,6 @@ class WP_Query { // Apply post-paging filters on where and join. Only plugins that // manipulate paging queries should use these hooks. - // Announce current selection parameters. For use by caching plugins. - do_action( 'posts_selection', $where . $groupby . $q['orderby'] . $limits . $join ); - $where = apply_filters('posts_where_paged', $where); $groupby = apply_filters('posts_groupby', $groupby); if ( ! empty($groupby) ) @@ -1248,6 +1245,9 @@ class WP_Query { if ( !empty($limits) ) $found_rows = 'SQL_CALC_FOUND_ROWS'; + // Announce current selection parameters. For use by caching plugins. + do_action( 'posts_selection', $where . $groupby . $q['orderby'] . $limits . $join ); + $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; $this->request = apply_filters('posts_request', $request);