Changeset 13052
- Timestamp:
- 02/10/2010 10:36:50 PM (15 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r13050 r13052 87 87 register_post_status( 'trash', array( 'label' => _x('Trash', 'post'), 88 88 'public' => true, 89 'exclude_from_search' => true, 89 90 '_builtin' => true, 90 91 'label_count' => _n_noop('Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>') … … 93 94 register_post_status( 'auto-draft', array( 'label' => _x('Auto-Draft', 'post'), 94 95 'public' => false, 96 'exclude_from_search' => true, 95 97 '_builtin' => true, 96 98 'label_count' => _n_noop('Auto-Draft <span class="count">(%s)</span>', 'Auto-Drafts <span class="count">(%s)</span>') -
trunk/wp-includes/query.php
r13049 r13052 2098 2098 $r_status = array(); 2099 2099 $p_status = array(); 2100 $e_status = array(); 2100 2101 if ( $q['post_status'] == 'any' ) { 2101 // @todo Use register_post_status() data to determine which states should be excluded.2102 $r_status[] = "$wpdb->posts.post_status <> 'trash'";2102 foreach ( get_post_stati( array('exclude_from_search' => true) ) as $status ) 2103 $e_status[] = "$wpdb->posts.post_status <> '$status'"; 2103 2104 } else { 2104 2105 foreach ( get_post_stati() as $status ) { … … 2117 2118 } 2118 2119 2120 if ( !empty($e_status) ) { 2121 $statuswheres[] = "(" . join( ' AND ', $e_status ) . ")"; 2122 } 2119 2123 if ( !empty($r_status) ) { 2120 2124 if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can("edit_others_{$post_type_cap}s") )
Note: See TracChangeset
for help on using the changeset viewer.