Make WordPress Core

Ticket #3048: load-both-functions.diff

File load-both-functions.diff, 877 bytes (added by skeltoac, 20 years ago)
  • wp-settings.php

     
    202202
    203203validate_current_theme();
    204204define('TEMPLATEPATH', get_template_directory());
     205define('STYLESHEETPATH', get_stylesheet_directory());
    205206
    206207// Load the default text localization domain.
    207208load_default_textdomain();
     
    212213$wp_locale = new WP_Locale();
    213214
    214215// Load functions for active theme.
    215 if ( file_exists(TEMPLATEPATH . "/functions.php") )
    216         include(TEMPLATEPATH . "/functions.php");
     216if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions.php') )
     217        include(STYLESHEETPATH . '/functions.php');
     218if ( file_exists(TEMPLATEPATH . '/functions.php') )
     219        include(TEMPLATEPATH . '/functions.php');
    217220
    218221function shutdown_action_hook() {
    219222        do_action('shutdown');