Make WordPress Core

Ticket #45587: 45587.diff

File 45587.diff, 957 bytes (added by spacedmonkey, 5 years ago)
  • src/wp-admin/includes/post.php

     
    10821082        if ( isset( $q['post_status'] ) && in_array( $q['post_status'], $post_stati ) ) {
    10831083                $post_status = $q['post_status'];
    10841084                $perm        = 'readable';
     1085        } else {
     1086                $post_status = '';
     1087                $perm        = '';
    10851088        }
    10861089
    10871090        if ( isset( $q['orderby'] ) ) {
     
    10881091                $orderby = $q['orderby'];
    10891092        } elseif ( isset( $q['post_status'] ) && in_array( $q['post_status'], array( 'pending', 'draft' ) ) ) {
    10901093                $orderby = 'modified';
     1094        } else {
     1095                $orderby = '';
    10911096        }
    10921097
    10931098        if ( isset( $q['order'] ) ) {
     
    10941099                $order = $q['order'];
    10951100        } elseif ( isset( $q['post_status'] ) && 'pending' == $q['post_status'] ) {
    10961101                $order = 'ASC';
     1102        } else {
     1103                $order = 'DESC';
    10971104        }
    10981105
    10991106        $per_page       = "edit_{$post_type}_per_page";