X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/includes/class-wp-list-table.php diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 6de7abf5..22c35f5e 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -72,7 +72,7 @@ class WP_List_Table { var $_pagination; /** - * Constructor. The child class should call this constructor from it's own constructor + * Constructor. The child class should call this constructor from its own constructor * * @param array $args An associative array with information about the current table * @access protected @@ -81,15 +81,16 @@ class WP_List_Table { $args = wp_parse_args( $args, array( 'plural' => '', 'singular' => '', - 'ajax' => false + 'ajax' => false, + 'screen' => null, ) ); - $screen = get_current_screen(); + $this->screen = convert_to_screen( $args['screen'] ); - add_filter( "manage_{$screen->id}_columns", array( &$this, 'get_columns' ), 0 ); + add_filter( "manage_{$this->screen->id}_columns", array( &$this, 'get_columns' ), 0 ); if ( !$args['plural'] ) - $args['plural'] = $screen->base; + $args['plural'] = $this->screen->base; $args['plural'] = sanitize_key( $args['plural'] ); $args['singular'] = sanitize_key( $args['singular'] ); @@ -209,6 +210,10 @@ class WP_List_Table { echo ''; if ( ! empty( $_REQUEST['order'] ) ) echo ''; + if ( ! empty( $_REQUEST['post_mime_type'] ) ) + echo ''; + if ( ! empty( $_REQUEST['detached'] ) ) + echo ''; ?>
- bulk_actions( $which ); ?> + bulk_actions(); ?>
extra_tablenav( $which ); @@ -822,7 +826,7 @@ class WP_List_Table { $row_class = ( $row_class == '' ? ' class="alternate"' : '' ); echo ''; - echo $this->single_row_columns( $item ); + $this->single_row_columns( $item ); echo ''; } @@ -903,13 +907,11 @@ class WP_List_Table { * @access private */ function _js_vars() { - $current_screen = get_current_screen(); - $args = array( 'class' => get_class( $this ), 'screen' => array( - 'id' => $current_screen->id, - 'base' => $current_screen->base, + 'id' => $this->screen->id, + 'base' => $this->screen->base, ) );