Make WordPress Core

Changeset 21700


Ignore:
Timestamp:
09/03/2012 07:42:31 PM (11 years ago)
Author:
nacin
Message:

Only show network-only plugins in the network admin. props SergeyBiryukov. see #21187, for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-plugins-list-table.php

    r21323 r21700  
    8484        foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
    8585            // Filter into individual sections
    86             if ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) {
     86            if ( is_multisite() && ! $screen->is_network && is_network_only_plugin( $plugin_file ) ) {
     87                unset( $plugins['all'][ $plugin_file ] );
     88            } elseif ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) {
    8789                unset( $plugins['all'][ $plugin_file ] );
    8890            } elseif ( ( ! $screen->is_network && is_plugin_active( $plugin_file ) )
Note: See TracChangeset for help on using the changeset viewer.