Changeset 4495 for trunk/wp-includes/query.php
- Timestamp:
- 11/19/2006 07:56:05 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/query.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r4488 r4495 4 4 * The Big Query. 5 5 */ 6 6 7 7 function get_query_var($var) { 8 8 global $wp_query; … … 225 225 * The Loop. Post loop control. 226 226 */ 227 227 228 228 function have_posts() { 229 229 global $wp_query; … … 417 417 $this->is_single = true; 418 418 } elseif (('' != $qv['hour']) && ('' != $qv['minute']) &&('' != $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day'])) { 419 // If year, month, day, hour, minute, and second are set, a single 420 // post is being queried. 419 // If year, month, day, hour, minute, and second are set, a single 420 // post is being queried. 421 421 $this->is_single = true; 422 422 } elseif ('' != $qv['static'] || '' != $qv['pagename'] || (int) $qv['page_id']) { … … 494 494 $this->is_category = true; 495 495 } 496 496 497 497 if ((empty($qv['author'])) || ($qv['author'] == '0')) { 498 498 $this->is_author = false; … … 772 772 // Category stuff 773 773 774 if ((empty($q['cat'])) || ($q['cat'] == '0') || 774 if ((empty($q['cat'])) || ($q['cat'] == '0') || 775 775 // Bypass cat checks if fetching specific posts 776 776 ( $this->is_single || $this->is_page )) { … … 789 789 $in_cats .= "$cat, " . get_category_children($cat, '', ', '); 790 790 else 791 $out_cats .= "$cat, " . get_category_children($cat, '', ', '); 791 $out_cats .= "$cat, " . get_category_children($cat, '', ', '); 792 792 } 793 793 $in_cats = substr($in_cats, 0, -2); … … 832 832 833 833 $q['cat'] = $reqcat; 834 834 835 835 $tables = ", $wpdb->post2cat, $wpdb->categories"; 836 836 $join = " LEFT JOIN $wpdb->post2cat ON ($wpdb->posts.ID = $wpdb->post2cat.post_id) LEFT JOIN $wpdb->categories ON ($wpdb->post2cat.category_id = $wpdb->categories.cat_ID) "; … … 923 923 if ( is_admin() ) 924 924 $where .= " OR post_status = 'future' OR post_status = 'draft'"; 925 925 926 926 if ( is_user_logged_in() ) { 927 927 if ( 'post' == $post_type ) … … 1025 1025 1026 1026 function next_post() { 1027 1027 1028 1028 $this->current_post++; 1029 1029 … … 1061 1061 } 1062 1062 } 1063 1063 1064 1064 function &query($query) { 1065 1065 $this->parse_query($query);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)