From e0da7f0d1dd37b008d59fa39b560f551740da5a7 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@4131 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-settings.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 6f75beb63c..6411f99a18 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');