Changeset 15775 for trunk/wp-includes/query.php
- Timestamp:
- 10/11/2010 03:04:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r15773 r15775 2187 2187 // manipulate paging queries should use these hooks. 2188 2188 if ( !$q['suppress_filters'] ) { 2189 $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) ); 2190 $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) ); 2189 2191 $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) ); 2192 $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) ); 2190 2193 $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) ); 2191 $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) );2192 2194 $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) ); 2193 $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) ); 2194 $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) ); 2195 $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) ); 2195 $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) ); 2196 2197 // Also apply a filter on all clauses at once, for convenience 2198 $clauses = array(); 2199 foreach ( array('distinct', 'fields', 'where', 'join', 'groupby', 'orderby', 'limits') as $var ) { 2200 $clauses[ $var ] = $$var; 2201 unset( $$var ); // so we can use EXTR_SKIP below 2202 } 2203 2204 $clauses = apply_filters_ref_array( 'wp_query_clauses', array( $clauses, &$this ) ); 2205 2206 extract( $clauses, EXTR_SKIP ); 2207 unset( $clauses ); 2196 2208 } 2197 2209 … … 2201 2213 // Filter again for the benefit of caching plugins. Regular plugins should use the hooks above. 2202 2214 if ( !$q['suppress_filters'] ) { 2215 $distinct = apply_filters_ref_array( 'posts_distinct_request',array( $distinct, &$this ) ); 2216 $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) ); 2203 2217 $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) ); 2204 $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) );2205 2218 $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) ); 2206 $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) ); 2207 $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) ); 2208 $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) ); 2209 $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) ); 2219 $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) ); 2220 $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) ); 2221 $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) ); 2210 2222 } 2211 2223
Note: See TracChangeset
for help on using the changeset viewer.