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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-02-22 19:37:26 +00:00
parent 2c52c876de
commit 13c2e250d4
1 changed files with 7 additions and 2 deletions

View File

@ -365,8 +365,13 @@ $recent_plugins = array();
$recently_activated = get_option('recently_activated', array());
$upgrade_plugins = array();
$network_plugins = array();
$mustuse_plugins = ( is_multisite() && is_super_admin() ) || ! is_multisite() ? get_mu_plugins() : array();
$dropins_plugins = ( is_multisite() && is_super_admin() ) || ! is_multisite() ? get_dropins() : array();
$mustuse_plugins = $dropins_plugins = array();
if ( ! is_multisite() || ( is_multisite() && current_user_can('manage_network_plugins') ) ) {
if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) )
$mustuse_plugins = get_mu_plugins();
if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
$dropins_plugins = get_dropins();
}
set_transient( 'plugin_slugs', array_keys($all_plugins), 86400 );