Changeset 21914 for trunk/wp-admin/includes/class-wp-plugins-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-plugins-list-table.php
r21789 r21914 10 10 class WP_Plugins_List_Table extends WP_List_Table { 11 11 12 function __construct( ) {12 function __construct( $args = array() ) { 13 13 global $status, $page; 14 15 parent::__construct( array( 16 'plural' => 'plugins', 17 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, 18 ) ); 14 19 15 20 $status = 'all'; … … 21 26 22 27 $page = $this->get_pagenum(); 23 24 parent::__construct( array(25 'plural' => 'plugins',26 ) );27 28 } 28 29 … … 51 52 ); 52 53 53 $screen = get_current_screen();54 $screen = $this->screen; 54 55 55 56 if ( ! is_multisite() || ( $screen->is_network && current_user_can('manage_network_plugins') ) ) { … … 92 93 $plugins['active'][ $plugin_file ] = $plugin_data; 93 94 } else { 94 if ( ! $screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?95 if ( ! $screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? 95 96 $plugins['recently_activated'][ $plugin_file ] = $plugin_data; 96 97 $plugins['inactive'][ $plugin_file ] = $plugin_data; … … 237 238 $actions = array(); 238 239 239 $screen = get_current_screen();240 241 240 if ( 'active' != $status ) 242 $actions['activate-selected'] = $ screen->is_network ? __( 'Network Activate' ) : __( 'Activate' );241 $actions['activate-selected'] = $this->screen->is_network ? __( 'Network Activate' ) : __( 'Activate' ); 243 242 244 243 if ( 'inactive' != $status && 'recent' != $status ) 245 $actions['deactivate-selected'] = $ screen->is_network ? __( 'Network Deactivate' ) : __( 'Deactivate' );246 247 if ( !is_multisite() || $ screen->is_network ) {244 $actions['deactivate-selected'] = $this->screen->is_network ? __( 'Network Deactivate' ) : __( 'Deactivate' ); 245 246 if ( !is_multisite() || $this->screen->is_network ) { 248 247 if ( current_user_can( 'update_plugins' ) ) 249 248 $actions['update-selected'] = __( 'Update' ); … … 272 271 echo '<div class="alignleft actions">'; 273 272 274 $screen = get_current_screen(); 275 276 if ( ! $screen->is_network && 'recently_activated' == $status ) 273 if ( ! $this->screen->is_network && 'recently_activated' == $status ) 277 274 submit_button( __( 'Clear List' ), 'small', 'clear-recent-list', false ); 278 275 elseif ( 'top' == $which && 'mustuse' == $status ) … … 294 291 global $status; 295 292 296 $screen = get_current_screen(); 297 298 if ( is_multisite() && !$screen->is_network && in_array( $status, array( 'mustuse', 'dropins' ) ) ) 293 if ( is_multisite() && ! $this->screen->is_network && in_array( $status, array( 'mustuse', 'dropins' ) ) ) 299 294 return; 300 295 … … 307 302 308 303 $context = $status; 309 310 $screen = get_current_screen(); 304 $screen = $this->screen; 311 305 312 306 // preorder
Note: See TracChangeset
for help on using the changeset viewer.