Ticket #55432: 55432.3.diff
File 55432.3.diff, 1.7 KB (added by , 3 years ago) |
---|
-
src/wp-settings.php
346 346 347 347 // Load must-use plugins. 348 348 foreach ( wp_get_mu_plugins() as $mu_plugin ) { 349 $_wp_plugin_file = $mu_plugin; 349 350 include_once $mu_plugin; 351 $mu_plugin = $_wp_plugin_file; // Avoid stomping of the $mu_plugin variable in a plugin. 350 352 351 353 /** 352 354 * Fires once a single must-use plugin has loaded. … … 357 359 */ 358 360 do_action( 'mu_plugin_loaded', $mu_plugin ); 359 361 } 360 unset( $mu_plugin );362 unset( $mu_plugin, $_wp_plugin_file ); 361 363 362 364 // Load network activated plugins. 363 365 if ( is_multisite() ) { 364 366 foreach ( wp_get_active_network_plugins() as $network_plugin ) { 365 367 wp_register_plugin_realpath( $network_plugin ); 368 369 $_wp_plugin_file = $network_plugin; 366 370 include_once $network_plugin; 371 $network_plugin = $_wp_plugin_file; // Avoid stomping of the $network_plugin variable in a plugin. 367 372 368 373 /** 369 374 * Fires once a single network-activated plugin has loaded. … … 374 379 */ 375 380 do_action( 'network_plugin_loaded', $network_plugin ); 376 381 } 377 unset( $network_plugin );382 unset( $network_plugin, $_wp_plugin_file ); 378 383 } 379 384 380 385 /** … … 415 420 // Load active plugins. 416 421 foreach ( wp_get_active_and_valid_plugins() as $plugin ) { 417 422 wp_register_plugin_realpath( $plugin ); 423 424 $_wp_plugin_file = $plugin; 418 425 include_once $plugin; 426 $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin. 419 427 420 428 /** 421 429 * Fires once a single activated plugin has loaded. … … 426 434 */ 427 435 do_action( 'plugin_loaded', $plugin ); 428 436 } 429 unset( $plugin );437 unset( $plugin, $_wp_plugin_file ); 430 438 431 439 // Load pluggable functions. 432 440 require ABSPATH . WPINC . '/pluggable.php';