Make WordPress Core

Changeset 13305


Ignore:
Timestamp:
02/22/2010 07:37:26 PM (15 years ago)
Author:
nacin
Message:

Add a boolean filter to allow suppression of the new mu-plugins and drop-ins tabs. See #11861

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r13268 r13305  
    366366$upgrade_plugins = array();
    367367$network_plugins = array();
    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();
     368$mustuse_plugins = $dropins_plugins = array();
     369if ( ! is_multisite() || ( is_multisite() && current_user_can('manage_network_plugins') ) ) {
     370    if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) )
     371        $mustuse_plugins = get_mu_plugins();
     372    if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
     373        $dropins_plugins = get_dropins();
     374}
    370375
    371376set_transient( 'plugin_slugs', array_keys($all_plugins), 86400 );
Note: See TracChangeset for help on using the changeset viewer.