Changeset 8773
- Timestamp:
- 08/29/2008 06:33:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r8766 r8773 779 779 $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); 780 780 781 if ( $this->is_posts_page && !$qv['withcomments'])781 if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) 782 782 $this->is_comment_feed = false; 783 783 … … 833 833 $search = ''; 834 834 $groupby = ''; 835 $fields = "$wpdb->posts.*"; 835 836 $post_status_join = false; 837 $page = 1; 836 838 837 839 if ( !isset($q['caller_get_posts']) ) … … 1433 1435 } 1434 1436 1437 $orderby = $q['orderby']; 1438 1435 1439 // Apply post-paging filters on where and join. Only plugins that 1436 1440 // manipulate paging queries should use these hooks. … … 1439 1443 $groupby = apply_filters('posts_groupby', $groupby); 1440 1444 $join = apply_filters('posts_join_paged', $join); 1441 $orderby = apply_filters('posts_orderby', $ q['orderby']);1445 $orderby = apply_filters('posts_orderby', $orderby); 1442 1446 $distinct = apply_filters('posts_distinct', $distinct); 1443 $fields = apply_filters('posts_fields', "$wpdb->posts.*");1447 $fields = apply_filters('posts_fields', $fields); 1444 1448 $limits = apply_filters( 'post_limits', $limits ); 1445 1449 } … … 1467 1471 $found_rows = 'SQL_CALC_FOUND_ROWS'; 1468 1472 1469 $ request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";1473 $this->request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 1470 1474 if ( !$q['suppress_filters'] ) 1471 $this->request = apply_filters('posts_request', $ request);1475 $this->request = apply_filters('posts_request', $this->request); 1472 1476 1473 1477 $this->posts = $wpdb->get_results($this->request);
Note: See TracChangeset
for help on using the changeset viewer.