Changeset 6341
- Timestamp:
- 11/18/2007 07:36:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r6338 r6341 1233 1233 $where = apply_filters('posts_where_paged', $where); 1234 1234 $groupby = apply_filters('posts_groupby', $groupby); 1235 if ( ! empty($groupby) )1236 $groupby = 'GROUP BY ' . $groupby;1237 1235 $join = apply_filters('posts_join_paged', $join); 1238 1236 $orderby = apply_filters('posts_orderby', $q['orderby']); 1239 if ( !empty( $orderby ) )1240 $orderby = 'ORDER BY ' . $orderby;1241 1237 $distinct = apply_filters('posts_distinct', $distinct); 1242 1238 $fields = apply_filters('posts_fields', "$wpdb->posts.*"); 1243 1239 $limits = apply_filters( 'post_limits', $limits ); 1240 1241 // Announce current selection parameters. For use by caching plugins. 1242 do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join ); 1243 1244 // Filter again for the benefit of caching plugins. Regular plugins should use the hooks above. 1245 $where = apply_filters('posts_where_request', $where); 1246 $groupby = apply_filters('posts_groupby_request', $groupby); 1247 $join = apply_filters('posts_join_request', $join); 1248 $orderby = apply_filters('posts_orderby_request', $orderby); 1249 $distinct = apply_filters('posts_distinct_request', $distinct); 1250 $fields = apply_filters('posts_fields_request', $fields); 1251 $limits = apply_filters( 'post_limits_request', $limits ); 1252 1253 if ( ! empty($groupby) ) 1254 $groupby = 'GROUP BY ' . $groupby; 1255 if ( !empty( $orderby ) ) 1256 $orderby = 'ORDER BY ' . $orderby; 1244 1257 $found_rows = ''; 1245 1258 if ( !empty($limits) ) 1246 1259 $found_rows = 'SQL_CALC_FOUND_ROWS'; 1247 1248 // Announce current selection parameters. For use by caching plugins.1249 do_action( 'posts_selection', $where . $groupby . $q['orderby'] . $limits . $join );1250 1260 1251 1261 $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
Note: See TracChangeset
for help on using the changeset viewer.