Move posts_selection action to after post_limits filter.

git-svn-id: https://develop.svn.wordpress.org/trunk@6338 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-11-17 00:04:19 +00:00
parent 71c8eab2dd
commit 4bcd8eec3f
1 changed files with 3 additions and 3 deletions

View File

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