List Tables: Revert [34728] and [35482].
Part of [34728] was already reverted in [35682], but the default values still made it impossible to set a default ordering for custom post types. See #25493. See #34825. Built from https://develop.svn.wordpress.org/trunk@35818 git-svn-id: http://core.svn.wordpress.org/trunk@35782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1008,16 +1008,12 @@ function wp_edit_posts_query( $q = false ) {
|
||||
$orderby = $q['orderby'];
|
||||
} elseif ( isset( $q['post_status'] ) && in_array( $q['post_status'], array( 'pending', 'draft' ) ) ) {
|
||||
$orderby = 'modified';
|
||||
} elseif ( ! is_post_type_hierarchical( $post_type ) ) {
|
||||
$orderby = 'date';
|
||||
}
|
||||
|
||||
if ( isset( $q['order'] ) ) {
|
||||
$order = $q['order'];
|
||||
} elseif ( isset( $q['post_status'] ) && 'pending' == $q['post_status'] ) {
|
||||
$order = 'ASC';
|
||||
} else {
|
||||
$order = 'desc';
|
||||
}
|
||||
|
||||
$per_page = "edit_{$post_type}_per_page";
|
||||
@@ -1844,4 +1840,4 @@ function redirect_post($post_id = '') {
|
||||
*/
|
||||
wp_redirect( apply_filters( 'redirect_post_location', $location, $post_id ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user