Make WordPress Core

Ticket #11861: 11861.2.diff

File 11861.2.diff, 922 bytes (added by nacin, 12 years ago)

Adds filter to allow suppression of pages.

  • plugins.php

     
    365365$recently_activated = get_option('recently_activated', array());
    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() && is_super_admin() ) ) {
     370        if ( apply_filters( 'expose_advanced_plugins', true, 'mustuse' ) )
     371                $mustuse_plugins = get_mu_plugins();
     372        if ( apply_filters( 'expose_advanced_plugins', true, 'dropins' ) )
     373                $dropins_plugins = get_dropins();
     374}
    370375
    371376set_transient( 'plugin_slugs', array_keys($all_plugins), 86400 );
    372377