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
This commit is contained in:
ryan 2006-08-30 09:14:37 +00:00
parent ef252310ae
commit b55b6aa240

View File

@ -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');