Changeset 11998 for trunk/wp-includes/query.php
- Timestamp:
- 10/06/2009 02:43:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r11978 r11998 2073 2073 $post_type_cap = $post_type; 2074 2074 2075 $exclude_post_types = ''; 2076 foreach ( get_post_types( array('exclude_from_search' => true) ) as $_wp_post_type ) 2077 $exclude_post_types .= $wpdb->prepare(" AND $wpdb->posts.post_type != %s", $_wp_post_type); 2078 2075 2079 if ( 'any' == $post_type ) { 2076 $where .= " AND $wpdb->posts.post_type != 'revision'";2080 $where .= $exclude_post_types; 2077 2081 } elseif ( ! empty( $post_type ) ) { 2078 2082 $where .= " AND $wpdb->posts.post_type = '$post_type'";
Note: See TracChangeset
for help on using the changeset viewer.