WordPress.org

Make WordPress Core

Changeset 22918


Ignore:
Timestamp:
11/29/2012 02:49:19 AM (5 years ago)
Author:
nacin
Message:

Show plugin activation message when activating a network only plugin on a single site installation. fixes #22576 for the 3.4 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4/wp-admin/plugins.php

    r21741 r22918  
    3737            if ( ! current_user_can('activate_plugins') )
    3838                wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
     39
     40            if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
     41                wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
     42                exit;
     43            }
    3944
    4045            check_admin_referer('activate-plugin_' . $plugin);
     
    5257
    5358            if ( ! is_network_admin() ) {
    54                 if ( is_network_only_plugin( $plugin ) ) {
    55                     wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
    56                     exit;
    57                 }
    58 
    5959                $recent = (array) get_option( 'recently_activated' );
    6060                unset( $recent[ $plugin ] );
Note: See TracChangeset for help on using the changeset viewer.