Ticket #18298: 18298.diff
File 18298.diff, 3.7 KB (added by , 13 years ago) |
---|
-
wp-includes/theme.php
14 14 * @return bool true if a child theme is in use, false otherwise. 15 15 **/ 16 16 function is_child_theme() { 17 return ( TEMPLATEPATH !== STYLESHEETPATH);17 return ( get_template_directory() !== get_stylesheet_directory() ); 18 18 } 19 19 20 20 /** … … 1062 1062 /** 1063 1063 * Retrieve the name of the highest priority template file that exists. 1064 1064 * 1065 * Searches in the STYLESHEETPATH before TEMPLATEPATHso that themes which1065 * Searches in the stylesheet path before template path so that themes which 1066 1066 * inherit from a parent theme can just overload one file. 1067 1067 * 1068 1068 * @since 2.7.0 … … 1077 1077 foreach ( (array) $template_names as $template_name ) { 1078 1078 if ( !$template_name ) 1079 1079 continue; 1080 if ( file_exists( STYLESHEETPATH. '/' . $template_name)) {1081 $located = STYLESHEETPATH. '/' . $template_name;1080 if ( file_exists(get_stylesheet_directory() . '/' . $template_name)) { 1081 $located = get_stylesheet_directory() . '/' . $template_name; 1082 1082 break; 1083 } else if ( file_exists( TEMPLATEPATH. '/' . $template_name) ) {1084 $located = TEMPLATEPATH. '/' . $template_name;1083 } else if ( file_exists(get_template_directory() . '/' . $template_name) ) { 1084 $located = get_template_directory() . '/' . $template_name; 1085 1085 break; 1086 1086 } 1087 1087 } -
wp-includes/comment-template.php
831 831 * and the post ID respectively. 832 832 * 833 833 * The $file path is passed through a filter hook called, 'comments_template' 834 * which includes the TEMPLATEPATHand $file combined. Tries the $filtered path834 * which includes the template path and $file combined. Tries the $filtered path 835 835 * first and if it fails it will require the default comment themplate from the 836 836 * default theme. If either does not exist, then the WordPress process will be 837 837 * halted. It is advised for that reason, that the default theme is not deleted. … … 908 908 if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE) 909 909 define('COMMENTS_TEMPLATE', true); 910 910 911 $include = apply_filters('comments_template', STYLESHEETPATH. $file );911 $include = apply_filters('comments_template', get_stylesheet_directory() . $file ); 912 912 if ( file_exists( $include ) ) 913 913 require( $include ); 914 elseif ( file_exists( TEMPLATEPATH. $file ) )915 require( TEMPLATEPATH. $file );914 elseif ( file_exists( get_template_directory() . $file ) ) 915 require( get_template_directory() . $file ); 916 916 else // Backward compat code will be removed in a future release 917 917 require( ABSPATH . WPINC . '/theme-compat/comments.php'); 918 918 } -
wp-settings.php
278 278 279 279 // Load the functions for the active theme, for both parent and child theme if applicable. 280 280 if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { 281 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH. '/functions.php' ) )282 include( STYLESHEETPATH. '/functions.php' );283 if ( file_exists( TEMPLATEPATH. '/functions.php' ) )284 include( TEMPLATEPATH. '/functions.php' );281 if ( get_template_directory() !== get_stylesheet_directory() && file_exists( get_stylesheet_directory() . '/functions.php' ) ) 282 include( get_stylesheet_directory() . '/functions.php' ); 283 if ( file_exists( get_template_directory() . '/functions.php' ) ) 284 include( get_template_directory() . '/functions.php' ); 285 285 } 286 286 287 287 do_action( 'after_setup_theme' );