Make WordPress Core


Ignore:
Timestamp:
09/19/2012 12:43:31 PM (12 years ago)
Author:
ryan
Message:

Reduce reliance on global variables in the list tables. Allow passing a screen ID to the list tables so that ajax handlers can set the needed screen.

Props nacin
fixes #21871

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-media-list-table.php

    r21880 r21914  
    1010class WP_Media_List_Table extends WP_List_Table {
    1111
    12     function __construct() {
     12    function __construct( $args = array() ) {
    1313        $this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
    1414
    1515        parent::__construct( array(
    16             'plural' => 'media'
     16            'plural' => 'media',
     17            'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
    1718        ) );
    1819    }
Note: See TracChangeset for help on using the changeset viewer.