From fb6a97d14bb54d614b8e3f82c747448dbb46ab91 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 22 Feb 2009 08:30:12 +0000 Subject: [PATCH] Unset once we have included all the plugins to keep things tidy. Fixes #6308 props DD32. git-svn-id: https://develop.svn.wordpress.org/trunk@10624 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-settings.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index b0437be9b7..718e973d52 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -462,18 +462,19 @@ if ( !defined( 'AUTOSAVE_INTERVAL' ) ) require (ABSPATH . WPINC . '/vars.php'); // Check for hacks file if the option is enabled -if (get_option('hack_file')) { - if (file_exists(ABSPATH . 'my-hacks.php')) +if ( get_option('hack_file') ) { + if ( file_exists(ABSPATH . 'my-hacks.php') ) require(ABSPATH . 'my-hacks.php'); } if ( get_option('active_plugins') && !defined('WP_INSTALLING') ) { $current_plugins = get_option('active_plugins'); if ( is_array($current_plugins) ) { - foreach ($current_plugins as $plugin) { + foreach ( $current_plugins as $plugin ) { if ( '' != $plugin && 0 == validate_file($plugin) && file_exists(WP_PLUGIN_DIR . '/' . $plugin) ) include_once(WP_PLUGIN_DIR . '/' . $plugin); } + unset($plugin); } }