Changeset 16235 for trunk/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 11/08/2010 03:43:44 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/class-wp-list-table.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-list-table.php
r16226 r16235 79 79 function WP_List_Table( $args = array() ) { 80 80 $args = wp_parse_args( $args, array( 81 'screen' => get_current_screen(),82 81 'plural' => '', 83 82 'singular' => '', … … 85 84 ) ); 86 85 87 $this->screen = $args['screen']; 88 89 if ( is_string( $this->screen ) ) 90 $this->screen = convert_to_screen( $this->screen ); 91 92 add_filter( 'manage_' . $this->screen->id . '_columns', array( &$this, 'get_columns' ), 0 ); 86 $screen = get_current_screen(); 87 88 add_filter( "manage_{$screen->id}_columns", array( &$this, 'get_columns' ), 0 ); 93 89 94 90 if ( !$args['plural'] ) 95 $args['plural'] = $ this->screen->base;91 $args['plural'] = $screen->base; 96 92 97 93 $this->_args = $args; … … 204 200 */ 205 201 function views() { 202 $screen = get_current_screen(); 203 206 204 $views = $this->get_views(); 207 $views = apply_filters( 'views_' . $ this->screen->id, $views );205 $views = apply_filters( 'views_' . $screen->id, $views ); 208 206 209 207 if ( empty( $views ) ) … … 238 236 */ 239 237 function bulk_actions() { 238 $screen = get_current_screen(); 240 239 241 240 if ( is_null( $this->_actions ) ) { 242 241 $this->_actions = $this->get_bulk_actions(); 243 $this->_actions = apply_filters( 'bulk_actions-' . $ this->screen->id, $this->_actions );242 $this->_actions = apply_filters( 'bulk_actions-' . $screen->id, $this->_actions ); 244 243 $two = ''; 245 244 } … … 539 538 function get_column_info() { 540 539 if ( !isset( $this->_column_headers ) ) { 541 $columns = get_column_headers( $this->screen ); 542 $hidden = get_hidden_columns( $this->screen ); 543 $sortable = apply_filters( 'manage_' . $this->screen->id . '_sortable_columns', $this->get_sortable_columns() ); 540 $screen = get_current_screen(); 541 542 $columns = get_column_headers( $screen ); 543 $hidden = get_hidden_columns( $screen ); 544 $sortable = apply_filters( "manage_{$screen->id}_sortable_columns", $this->get_sortable_columns() ); 544 545 545 546 $this->_column_headers = array( $columns, $hidden, $sortable ); … … 558 559 */ 559 560 function print_column_headers( $with_id = true ) { 560 $screen = $this->screen;561 $screen = get_current_screen(); 561 562 562 563 list( $columns, $hidden, $sortable ) = $this->get_column_info(); … … 811 812 $args = array( 812 813 'class' => get_class( $this ), 813 'screen' => $this->screen814 'screen' => get_current_screen() 814 815 ); 815 816
Note: See TracChangeset
for help on using the changeset viewer.