WordPress.org

Make WordPress Core

Ticket #14579: 14579-fix_current_screen.diff

File 14579-fix_current_screen.diff, 548 bytes (added by rovo89, 3 years ago)

Sets $current_screen before creating the instance of WP_Posts_Table

  • wp-admin/admin-ajax.php

     
    5252switch ( $action = $_GET['action'] ) : 
    5353case 'fetch-list' : 
    5454 
     55        $current_screen = (object) $_GET['list_args']['screen']; 
    5556        $wp_list_table = get_list_table( $_GET['list_args']['class'] ); 
    5657        if ( ! $wp_list_table ) 
    5758                die( '0' ); 
    5859 
    59         $current_screen = (object) $_GET['list_args']['screen']; 
    6060        $wp_list_table->ajax_response(); 
    6161 
    6262        die( '0' );