Changeset 5916
- Timestamp:
- 08/22/2007 06:03:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r5912 r5916 1129 1129 1130 1130 // Apply post-paging filters on where and join. Only plugins that 1131 // manipulate paging queries should use these hooks. 1131 // manipulate paging queries should use these hooks. 1132 1133 // Announce current selection parameters. For use by caching plugins. 1134 do_action( 'posts_selection', $where . $groupby . $q['orderby'] . $limits . $join ); 1135 1132 1136 $where = apply_filters('posts_where_paged', $where); 1133 1137 $groupby = apply_filters('posts_groupby', $groupby); … … 1136 1140 $join = apply_filters('posts_join_paged', $join); 1137 1141 $orderby = apply_filters('posts_orderby', $q['orderby']); 1142 if ( !empty( $orderby ) ) 1143 $orderby = 'ORDER BY ' . $orderby; 1138 1144 $distinct = apply_filters('posts_distinct', $distinct); 1139 1145 $fields = apply_filters('posts_fields', "$wpdb->posts.*"); … … 1143 1149 $found_rows = 'SQL_CALC_FOUND_ROWS'; 1144 1150 1145 $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby ORDER BY$orderby $limits";1151 $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 1146 1152 $this->request = apply_filters('posts_request', $request); 1147 1153 1148 1154 $this->posts = $wpdb->get_results($this->request); 1155 // Raw results filter. Prior to status checks. 1156 $this->posts = apply_filters('posts_results', $this->posts); 1149 1157 1150 1158 if ( $this->is_comment_feed && $this->is_singular ) {
Note: See TracChangeset
for help on using the changeset viewer.