From b55b6aa240d37bac6f81604c5901bf929259a860 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 30 Aug 2006 09:14:37 +0000 Subject: [PATCH] Allow stylesheet only themes to provide functions.php. Props skeltoac. fixes #3048 git-svn-id: http://svn.automattic.com/wordpress/trunk@4131 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 6f75beb63..6411f99a1 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -202,6 +202,7 @@ $wp = new WP(); validate_current_theme(); define('TEMPLATEPATH', get_template_directory()); +define('STYLESHEETPATH', get_stylesheet_directory()); // Load the default text localization domain. load_default_textdomain(); @@ -212,8 +213,10 @@ require_once(ABSPATH . WPINC . '/locale.php'); $wp_locale = new WP_Locale(); // Load functions for active theme. -if ( file_exists(TEMPLATEPATH . "/functions.php") ) - include(TEMPLATEPATH . "/functions.php"); +if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions.php') ) + include(STYLESHEETPATH . '/functions.php'); +if ( file_exists(TEMPLATEPATH . '/functions.php') ) + include(TEMPLATEPATH . '/functions.php'); function shutdown_action_hook() { do_action('shutdown');