WordPress.org

Make WordPress Core

Ticket #29772: 29772.diff

File 29772.diff, 463 bytes (added by aubreypwd, 5 years ago)

Don't load plugins on the plugins.php page.

  • wp-settings.php

    diff --git a/wp-settings.php b/wp-settings.php
    index 9795971..bc4a6a2 100644
    a b register_theme_directory( get_theme_root() ); 
    212212// Load active plugins.
    213213foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    214214        wp_register_plugin_realpath( $plugin );
    215         include_once( $plugin );
     215
     216        if( 'plugins.php' != basename( $_SERVER['SCRIPT_NAME'] ) ) {
     217                include_once( $plugin );
     218        }
    216219}
    217220unset( $plugin );
    218221