Changeset 15491 for trunk/wp-admin/includes/post.php
- Timestamp:
- 08/11/2010 09:54:51 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/post.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r15450 r15491 881 881 } 882 882 883 if ( isset($q['post_status']) && 'pending' === $q['post_status'] ) { 883 if ( isset($q['orderby']) ) 884 $orderby = $q['orderby']; 885 elseif ( isset($q['post_status']) && in_array($q['post_status'], array('pending', 'draft')) ) 886 $orderby = 'modified'; 887 888 if ( isset($q['order']) ) 889 $order = $q['order']; 890 elseif ( isset($q['post_status']) && 'pending' == $q['post_status'] ) 884 891 $order = 'ASC'; 885 $orderby = 'modified';886 } elseif ( isset($q['post_status']) && 'draft' === $q['post_status'] ) {887 $order = 'DESC';888 $orderby = 'modified';889 } else {890 $order = 'DESC';891 $orderby = 'date';892 }893 892 894 893 $per_page = 'edit_' . $post_type . '_per_page'; … … 903 902 904 903 // Hierarchical types require special args. 905 if ( is_post_type_hierarchical( $post_type ) ) {904 if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) { 906 905 $query['orderby'] = 'menu_order title'; 907 906 $query['order'] = 'asc'; … … 974 973 unset($q['post_mime_type']); 975 974 975 if ( isset($q['detached']) ) 976 add_filter('posts_where', '_edit_attachments_query_helper'); 977 976 978 wp($q); 977 979 980 if ( isset($q['detached']) ) 981 remove_filter('posts_where', '_edit_attachments_query_helper'); 982 978 983 return array($post_mime_types, $avail_post_mime_types); 984 } 985 986 function _edit_attachments_query_helper($where) { 987 return $where .= ' AND post_parent < 1'; 979 988 } 980 989
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)