Make WordPress Core

Ticket #17435: 17435.patch

File 17435.patch, 1.1 KB (added by johnbillion, 14 years ago)
  • wp-admin/includes/class-wp-list-table.php

     
    636636         * @param bool $with_id Whether to set the id attribute or not
    637637         */
    638638        function print_column_headers( $with_id = true ) {
     639                global $wp_query;
     640
    639641                $screen = get_current_screen();
    640642
    641643                list( $columns, $hidden, $sortable ) = $this->get_column_info();
     
    643645                $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    644646                $current_url = remove_query_arg( 'paged', $current_url );
    645647
    646                 if ( isset( $_GET['orderby'] ) )
    647                         $current_orderby = $_GET['orderby'];
     648                if ( isset( $wp_query->query['orderby'] ) )
     649                        $current_orderby = $wp_query->query['orderby'];
    648650                else
    649651                        $current_orderby = '';
    650652
    651                 if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
     653                if ( isset( $wp_query->query['order'] ) && 'desc' == $wp_query->query['order'] )
    652654                        $current_order = 'desc';
    653655                else
    654656                        $current_order = 'asc';