Changeset 21914 for trunk/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 09/19/2012 12:43:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-list-table.php
r21789 r21914 82 82 'plural' => '', 83 83 'singular' => '', 84 'ajax' => false 84 'ajax' => false, 85 'screen' => null, 85 86 ) ); 86 87 87 $ screen = get_current_screen();88 89 add_filter( "manage_{$ screen->id}_columns", array( &$this, 'get_columns' ), 0 );88 $this->screen = convert_to_screen( $args['screen'] ); 89 90 add_filter( "manage_{$this->screen->id}_columns", array( &$this, 'get_columns' ), 0 ); 90 91 91 92 if ( !$args['plural'] ) 92 $args['plural'] = $ screen->base;93 $args['plural'] = $this->screen->base; 93 94 94 95 $args['plural'] = sanitize_key( $args['plural'] ); … … 243 244 */ 244 245 function views() { 245 $screen = get_current_screen();246 247 246 $views = $this->get_views(); 248 $views = apply_filters( 'views_' . $ screen->id, $views );247 $views = apply_filters( 'views_' . $this->screen->id, $views ); 249 248 250 249 if ( empty( $views ) ) … … 279 278 */ 280 279 function bulk_actions() { 281 $screen = get_current_screen();282 283 280 if ( is_null( $this->_actions ) ) { 284 281 $no_new_actions = $this->_actions = $this->get_bulk_actions(); 285 282 // This filter can currently only be used to remove actions. 286 $this->_actions = apply_filters( 'bulk_actions-' . $ screen->id, $this->_actions );283 $this->_actions = apply_filters( 'bulk_actions-' . $this->screen->id, $this->_actions ); 287 284 $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions ); 288 285 $two = ''; … … 605 602 return $this->_column_headers; 606 603 607 $screen = get_current_screen(); 608 609 $columns = get_column_headers( $screen ); 610 $hidden = get_hidden_columns( $screen ); 611 612 $_sortable = apply_filters( "manage_{$screen->id}_sortable_columns", $this->get_sortable_columns() ); 604 $columns = get_column_headers( $this->screen ); 605 $hidden = get_hidden_columns( $this->screen ); 606 607 $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $this->get_sortable_columns() ); 613 608 614 609 $sortable = array(); … … 652 647 */ 653 648 function print_column_headers( $with_id = true ) { 654 $screen = get_current_screen();655 656 649 list( $columns, $hidden, $sortable ) = $this->get_column_info(); 657 650 … … 915 908 */ 916 909 function _js_vars() { 917 $current_screen = get_current_screen();918 919 910 $args = array( 920 911 'class' => get_class( $this ), 921 912 'screen' => array( 922 'id' => $ current_screen->id,923 'base' => $ current_screen->base,913 'id' => $this->screen->id, 914 'base' => $this->screen->base, 924 915 ) 925 916 );
Note: See TracChangeset
for help on using the changeset viewer.