Changeset 16195 for trunk/wp-admin/includes/class-wp-plugins-list-table.php
- Timestamp:
- 11/04/2010 09:02:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-plugins-list-table.php
r16194 r16195 58 58 ); 59 59 60 if ( ! is_multisite() || ( $this-> _screen->is_network && current_user_can('manage_network_plugins') ) ) {60 if ( ! is_multisite() || ( $this->screen->is_network && current_user_can('manage_network_plugins') ) ) { 61 61 if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) 62 62 $plugins['mustuse'] = get_mu_plugins(); … … 86 86 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 87 87 // Filter into individual sections 88 if ( is_plugin_active_for_network($plugin_file) && !$this-> _screen->is_network ) {88 if ( is_plugin_active_for_network($plugin_file) && !$this->screen->is_network ) { 89 89 unset( $plugins['all'][ $plugin_file ] ); 90 90 continue; 91 91 } elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) { 92 92 $plugins['network'][ $plugin_file ] = $plugin_data; 93 } elseif ( ( !$this-> _screen->is_network && is_plugin_active( $plugin_file ) )94 || ( $this-> _screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) {93 } elseif ( ( !$this->screen->is_network && is_plugin_active( $plugin_file ) ) 94 || ( $this->screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) { 95 95 $plugins['active'][ $plugin_file ] = $plugin_data; 96 96 } else { 97 if ( !$this-> _screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?97 if ( !$this->screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? 98 98 $plugins['recently_activated'][ $plugin_file ] = $plugin_data; 99 99 $plugins['inactive'][ $plugin_file ] = $plugin_data; … … 129 129 } 130 130 131 $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this-> _screen->id}_per_page" ) );131 $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->screen->id}_per_page" ) ); 132 132 133 133 $start = ( $page - 1 ) * $plugins_per_page; … … 255 255 256 256 if ( 'active' != $status ) { 257 $action = $this-> _screen->is_network ? 'network-activate-selected' : 'activate-selected';257 $action = $this->screen->is_network ? 'network-activate-selected' : 'activate-selected'; 258 258 $actions[ $action ] = __( 'Activate' ); 259 259 } … … 262 262 $actions['deactivate-selected'] = __( 'Deactivate' ); 263 263 264 if ( !is_multisite() || $this-> _screen->is_network ) {264 if ( !is_multisite() || $this->screen->is_network ) { 265 265 if ( current_user_can( 'update_plugins' ) ) 266 266 $actions['update-selected'] = __( 'Update' ); … … 314 314 315 315 if ( 'mustuse' == $context ) { 316 if ( is_multisite() && !$this-> _screen->is_network )316 if ( is_multisite() && !$this->screen->is_network ) 317 317 continue; 318 318 $is_active = true; 319 319 } elseif ( 'dropins' == $context ) { 320 if ( is_multisite() && !$this-> _screen->is_network )320 if ( is_multisite() && !$this->screen->is_network ) 321 321 continue; 322 322 $dropins = _get_dropins(); … … 338 338 } else { 339 339 $is_active_for_network = is_plugin_active_for_network($plugin_file); 340 if ( $this-> _screen->is_network )340 if ( $this->screen->is_network ) 341 341 $is_active = $is_active_for_network; 342 342 else 343 343 $is_active = is_plugin_active( $plugin_file ); 344 344 345 if ( $is_active_for_network && !is_super_admin() && !$this-> _screen->is_network )345 if ( $is_active_for_network && !is_super_admin() && !$this->screen->is_network ) 346 346 continue; 347 347 348 if ( $this-> _screen->is_network ) {348 if ( $this->screen->is_network ) { 349 349 if ( $is_active_for_network ) { 350 350 if ( current_user_can( 'manage_network_plugins' ) ) … … 360 360 $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '">' . __('Deactivate') . '</a>'; 361 361 } else { 362 if ( is_network_only_plugin( $plugin_file ) && !$this-> _screen->is_network )362 if ( is_network_only_plugin( $plugin_file ) && !$this->screen->is_network ) 363 363 continue; 364 364 … … 368 368 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 369 369 } // end if $is_active 370 } // end if $this-> _screen->is_network370 } // end if $this->screen->is_network 371 371 372 372 if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
Note: See TracChangeset
for help on using the changeset viewer.