Ticket #18298: 18298.3.diff
File 18298.3.diff, 4.4 KB (added by , 13 years ago) |
---|
-
wp-includes/default-constants.php
279 279 /** 280 280 * Filesystem path to the current active template directory 281 281 * @since 1.5.0 282 * @deprecated 3.3 283 * @deprecated Use get_template_directory() 282 284 */ 283 285 define('TEMPLATEPATH', get_template_directory()); 284 286 285 287 /** 286 288 * Filesystem path to the current active template stylesheet directory 287 289 * @since 2.1.0 290 * @deprecated 3.3 291 * @deprecated Use get_stylesheet_directory() 288 292 */ 289 293 define('STYLESHEETPATH', get_stylesheet_directory()); 290 294 -
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
279 279 280 280 // Load the functions for the active theme, for both parent and child theme if applicable. 281 281 if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { 282 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH. '/functions.php' ) )283 include( STYLESHEETPATH. '/functions.php' );284 if ( file_exists( TEMPLATEPATH. '/functions.php' ) )285 include( TEMPLATEPATH. '/functions.php' );282 if ( get_template_directory() !== get_stylesheet_directory() && file_exists( get_stylesheet_directory() . '/functions.php' ) ) 283 include( get_stylesheet_directory() . '/functions.php' ); 284 if ( file_exists( get_template_directory() . '/functions.php' ) ) 285 include( get_template_directory() . '/functions.php' ); 286 286 } 287 287 288 288 do_action( 'after_setup_theme' );