WordPress.org

Make WordPress Core

Ticket #20335: 20335.diff

File 20335.diff, 616 bytes (added by ericmann, 10 years ago)

Filter the default mode for the posts list table.

  • wp-admin/includes/class-wp-posts-list-table.php

     
    9696                else
    9797                        $total_pages = $wp_query->max_num_pages;
    9898
    99                 $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
     99                $mode = empty( $_REQUEST['mode'] ) ? apply_filters( 'default-posts-list-mode', 'list' ) : $_REQUEST['mode'];
    100100
    101101                $this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] == 'trash';
    102102