From ff9610e36d57b5e632ff88c7790a63592f4d97e9 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 27 Apr 2011 21:16:49 +0000 Subject: [PATCH] Don't load themes functions.php for upgrades. Props greuben. fixes #16722 git-svn-id: http://svn.automattic.com/wordpress/trunk@17727 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 5cb2838481..9e053c9e50 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -273,10 +273,12 @@ require( ABSPATH . WPINC . '/locale.php' ); $wp_locale = new WP_Locale(); // Load the functions for the active theme, for both parent and child theme if applicable. -if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) - include( STYLESHEETPATH . '/functions.php' ); -if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) - include( TEMPLATEPATH . '/functions.php' ); +if ( ! defined( 'WP_INSTALLING' ) ) { + if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) + include( STYLESHEETPATH . '/functions.php' ); + if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) + include( TEMPLATEPATH . '/functions.php' ); +} do_action( 'after_setup_theme' );