Make WordPress Core

Ticket #34473: 34473-wrong-default-order-for-pages.diff

File 34473-wrong-default-order-for-pages.diff, 500 bytes (added by ellie.roepken, 10 years ago)

Check that the post type is hierarchical before assuming posts should be listed by date.

  • wp-admin/includes/post.php

     
    10081008                $orderby = $q['orderby'];
    10091009        } elseif ( isset( $q['post_status'] ) && in_array( $q['post_status'], array( 'pending', 'draft' ) ) ) {
    10101010                $orderby = 'modified';
    1011         } else {
     1011        } elseif ( isset( $post_type ) && ! is_post_type_hierarchical( $post_type ) ) {
    10121012                $orderby = 'date';
    10131013        }
    10141014