Changeset 11420
- Timestamp:
- 05/21/2009 12:10:04 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r11415 r11420 1583 1583 $groupby = ''; 1584 1584 $fields = "$wpdb->posts.*"; 1585 $post_status_join = false; 1585 1586 $page = 1; 1586 1587 … … 1958 1959 $post_type = 'any'; 1959 1960 $q['post_status'] = 'publish'; 1961 $post_status_join = true; 1960 1962 } else { 1961 1963 $whichcat = " AND 0 "; … … 2111 2113 else 2112 2114 $statuswheres[] = "(" . join( ' OR ', $p_status ) . ")"; 2115 } 2116 if ( $post_status_join ) { 2117 $join .= " JOIN $wpdb->posts AS p2 ON ($wpdb->posts.post_parent = p2.ID) "; 2118 foreach ( $statuswheres as $index => $statuswhere ) 2119 $statuswheres[$index] = "($statuswhere OR ($wpdb->posts.post_status = 'inherit' AND " . str_replace($wpdb->posts, 'p2', $statuswhere) . "))"; 2113 2120 } 2114 2121 foreach ( $statuswheres as $statuswhere )
Note: See TracChangeset
for help on using the changeset viewer.