Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Show plugin activation message when activating a network only plugin …

…on a single site installation.

Props nacin
fixes #22576


git-svn-id: http://core.svn.wordpress.org/trunk@22871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit c1bd9e3795a2d8637c80257bdc4b9fc66180618d 1 parent 374bf89
Ryan Boren authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 wp-admin/plugins.php
View
10 wp-admin/plugins.php
@@ -30,6 +30,11 @@
if ( ! current_user_can('activate_plugins') )
wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
+ if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
+ wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+ exit;
+ }
+
check_admin_referer('activate-plugin_' . $plugin);
$result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );
@@ -44,11 +49,6 @@
}
if ( ! is_network_admin() ) {
- if ( is_network_only_plugin( $plugin ) ) {
- wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
- exit;
- }
-
$recent = (array) get_option( 'recently_activated' );
unset( $recent[ $plugin ] );
update_option( 'recently_activated', $recent );
Please sign in to comment.
Something went wrong with that request. Please try again.