Opened 11 years ago
Closed 11 years ago
#34473 closed defect (bug) (fixed)
Wrong default order for pages list table in 4.4
| Reported by: | szaqal21 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Posts, Post Types | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | administration |
Description
Default order of pages list table in 4.4 is "date". I've investigated source and found that this is caused by function wp_edit_posts_query():
if ( isset( $q['orderby'] ) ) {
$orderby = $q['orderby'];
} elseif ( isset( $q['post_status'] ) && in_array( $q['post_status'], array( 'pending', 'draft' ) ) ) {
$orderby = 'modified';
} else {
$orderby = 'date';
}
}
else statement is causing this problem:
else {
$orderby = 'date';
}
it wasn't present in 4.3.
Attachments (1)
Change History (6)
@
11 years ago
Check that the post type is hierarchical before assuming posts should be listed by date.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Introduced in [34728].