Changeset 13235
- Timestamp:
- 02/19/2010 09:53:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r13233 r13235 366 366 $upgrade_plugins = array(); 367 367 $network_plugins = array(); 368 $mustuse_plugins = get_mu_plugins();369 $dropins_plugins = get_dropins();368 $mustuse_plugins = ( is_multisite() && is_super_admin() ) || ! is_multisite() ? get_mu_plugins() : array(); 369 $dropins_plugins = ( is_multisite() && is_super_admin() ) || ! is_multisite() ? get_dropins() : array(); 370 370 371 371 set_transient( 'plugin_slugs', array_keys($all_plugins), 86400 ); … … 390 390 foreach ( (array) $all_plugins as $plugin_file => $plugin_data) { 391 391 // Filter into individual sections 392 if ( is_plugin_active_for_network($plugin_file) && is_super_admin() ) { 393 $network_plugins[ $plugin_file ] = $plugin_data; 392 if ( is_plugin_active_for_network($plugin_file) ) { 393 if ( is_super_admin() ) 394 $network_plugins[ $plugin_file ] = $plugin_data; 394 395 } elseif ( is_plugin_active($plugin_file) ) { 395 396 $active_plugins[ $plugin_file ] = $plugin_data; … … 400 401 } 401 402 402 403 403 if ( isset( $current->response[ $plugin_file ] ) ) 404 $upgrade_plugins[ $plugin_file ] = $plugin_data; 404 405 } 405 406 … … 539 540 } 540 541 } else { 541 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; 542 if ( is_multisite() && is_network_only_plugin( $plugin_file ) ) 543 $actions[] = '<span title="' . __('This plugin can only be activated for all sites in a network') . '">' . __('Network Only') . '</span>'; 544 else 545 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; 542 546 if ( is_multisite() && is_super_admin() ) 543 547 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>'; 544 } 545 546 if ( is_multisite() && is_network_only_plugin( $plugin_file ) ) 547 $actions[] = '<span title="' . __('This plugin can only be activated for all sites in a network') . '">' . __('Network Only') . '</span>'; 548 else 549 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; 550 if ( is_multisite() && is_super_admin() ) 551 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>'; 552 553 if ( !is_multisite() && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) 554 $actions[] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>'; 555 556 if ( ! $is_active && current_user_can('delete_plugins') ) 557 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'bulk-manage-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 558 548 549 if ( !is_multisite() && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) 550 $actions[] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>'; 551 552 if ( ! $is_active && current_user_can('delete_plugins') ) 553 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'bulk-manage-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 554 } 559 555 } 560 556
Note: See TracChangeset
for help on using the changeset viewer.