Changeset 29044
- Timestamp:
- 07/09/2014 06:06:54 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r28976 r29044 1064 1064 * 1065 1065 * The $file path is passed through a filter hook called, 'comments_template' 1066 * which includes the template pathand $file combined. Tries the $filtered path1066 * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path 1067 1067 * first and if it fails it will require the default comment template from the 1068 1068 * default theme. If either does not exist, then the WordPress process will be … … 1149 1149 define('COMMENTS_TEMPLATE', true); 1150 1150 1151 $theme_template = get_stylesheet_directory(). $file;1151 $theme_template = STYLESHEETPATH . $file; 1152 1152 /** 1153 1153 * Filter the path to the theme template file used for the comments template. … … 1160 1160 if ( file_exists( $include ) ) 1161 1161 require( $include ); 1162 elseif ( file_exists( get_template_directory(). $file ) )1163 require( get_template_directory(). $file );1162 elseif ( file_exists( TEMPLATEPATH . $file ) ) 1163 require( TEMPLATEPATH . $file ); 1164 1164 else // Backward compat code will be removed in a future release 1165 1165 require( ABSPATH . WPINC . '/theme-compat/comments.php'); -
trunk/src/wp-includes/default-constants.php
r28674 r29044 303 303 * Filesystem path to the current active template directory 304 304 * @since 1.5.0 305 * @deprecated 4.0.0306 * @deprecated Use get_template_directory()307 305 */ 308 306 define('TEMPLATEPATH', get_template_directory()); … … 311 309 * Filesystem path to the current active template stylesheet directory 312 310 * @since 2.1.0 313 * @deprecated 4.0.0314 * @deprecated Use get_stylesheet_directory()315 311 */ 316 312 define('STYLESHEETPATH', get_stylesheet_directory()); -
trunk/src/wp-includes/template.php
r28563 r29044 450 450 * Retrieve the name of the highest priority template file that exists. 451 451 * 452 * Searches in the stylesheet path before template pathso that themes which452 * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which 453 453 * inherit from a parent theme can just overload one file. 454 454 * … … 465 465 if ( !$template_name ) 466 466 continue; 467 if ( file_exists( get_stylesheet_directory() . '/' . $template_name )) {468 $located = get_stylesheet_directory(). '/' . $template_name;467 if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { 468 $located = STYLESHEETPATH . '/' . $template_name; 469 469 break; 470 } else if ( file_exists( get_template_directory() . '/' . $template_name) ) {471 $located = get_template_directory(). '/' . $template_name;470 } else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) { 471 $located = TEMPLATEPATH . '/' . $template_name; 472 472 break; 473 473 } -
trunk/src/wp-includes/theme.php
r29025 r29044 129 129 **/ 130 130 function is_child_theme() { 131 return get_template_directory() !== get_stylesheet_directory();131 return ( TEMPLATEPATH !== STYLESHEETPATH ); 132 132 } 133 133 -
trunk/src/wp-settings.php
r28934 r29044 323 323 // Load the functions for the active theme, for both parent and child theme if applicable. 324 324 if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { 325 if ( is_child_theme() && file_exists( get_stylesheet_directory() . '/functions.php' ) ) { 326 include get_stylesheet_directory() . '/functions.php'; 327 } 328 if ( file_exists( get_template_directory() . '/functions.php' ) ) { 329 include get_template_directory() . '/functions.php'; 330 } 325 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) 326 include( STYLESHEETPATH . '/functions.php' ); 327 if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) 328 include( TEMPLATEPATH . '/functions.php' ); 331 329 } 332 330
Note: See TracChangeset
for help on using the changeset viewer.