From ca898ccbdb57ca95b18c1194dbfb65270e605400 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 1 Nov 2015 00:48:36 +0000 Subject: [PATCH] Post List Table: Hierarchical post types should not default to sorting by date. Regression introduced in [34728]. Props ellie.roepken. Fixes #34473. See #25493. git-svn-id: https://develop.svn.wordpress.org/trunk@35482 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index fa86377dbe..4e2bc39793 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1008,7 +1008,7 @@ 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'; - } else { + } elseif ( ! is_post_type_hierarchical( $post_type ) ) { $orderby = 'date'; }