Make WordPress Core

Ticket #55432: 55432.diff

File 55432.diff, 1.8 KB (added by SergeyBiryukov, 3 years ago)
  • src/wp-settings.php

     
    361361
    362362// Load network activated plugins.
    363363if ( is_multisite() ) {
    364         foreach ( wp_get_active_network_plugins() as $network_plugin ) {
    365                 wp_register_plugin_realpath( $network_plugin );
    366                 include_once $network_plugin;
     364        foreach ( wp_get_active_network_plugins() as $_wp_network_plugin_file ) {
     365                wp_register_plugin_realpath( $_wp_network_plugin_file );
     366                include_once $_wp_network_plugin_file;
    367367
    368368                /**
    369369                 * Fires once a single network-activated plugin has loaded.
     
    370370                 *
    371371                 * @since 5.1.0
    372372                 *
    373                  * @param string $network_plugin Full path to the plugin's main file.
     373                 * @param string $_wp_network_plugin_file Full path to the plugin's main file.
    374374                 */
    375                 do_action( 'network_plugin_loaded', $network_plugin );
     375                do_action( 'network_plugin_loaded', $_wp_network_plugin_file );
    376376        }
    377         unset( $network_plugin );
     377        unset( $_wp_network_plugin_file );
    378378}
    379379
    380380/**
     
    413413}
    414414
    415415// Load active plugins.
    416 foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    417         wp_register_plugin_realpath( $plugin );
    418         include_once $plugin;
     416foreach ( wp_get_active_and_valid_plugins() as $_wp_plugin_file ) {
     417        wp_register_plugin_realpath( $_wp_plugin_file );
     418        include_once $_wp_plugin_file;
    419419
    420420        /**
    421421         * Fires once a single activated plugin has loaded.
     
    422422         *
    423423         * @since 5.1.0
    424424         *
    425          * @param string $plugin Full path to the plugin's main file.
     425         * @param string $_wp_plugin_file Full path to the plugin's main file.
    426426         */
    427         do_action( 'plugin_loaded', $plugin );
     427        do_action( 'plugin_loaded', $_wp_plugin_file );
    428428}
    429 unset( $plugin );
     429unset( $_wp_plugin_file );
    430430
    431431// Load pluggable functions.
    432432require ABSPATH . WPINC . '/pluggable.php';