Fix the theme compat file require paths to be fully absolute so they don't rely on a particular php path to work. Fixes #14315 for trunk props dougal.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9f10f4fe56
commit
64100e8783
|
@ -920,7 +920,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false
|
|||
elseif ( file_exists( TEMPLATEPATH . $file ) )
|
||||
require( TEMPLATEPATH . $file );
|
||||
else // Backward compat code will be removed in a future release
|
||||
require( WPINC . '/theme-compat/comments.php');
|
||||
require( ABSPATH . WPINC . '/theme-compat/comments.php');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,7 @@ function get_header( $name = null ) {
|
|||
|
||||
// Backward compat code will be removed in a future release
|
||||
if ('' == locate_template($templates, true))
|
||||
load_template( WPINC . '/theme-compat/header.php');
|
||||
load_template( ABSPATH . WPINC . '/theme-compat/header.php');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ function get_footer( $name = null ) {
|
|||
|
||||
// Backward compat code will be removed in a future release
|
||||
if ('' == locate_template($templates, true))
|
||||
load_template( WPINC . '/theme-compat/footer.php');
|
||||
load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,7 +90,7 @@ function get_sidebar( $name = null ) {
|
|||
|
||||
// Backward compat code will be removed in a future release
|
||||
if ('' == locate_template($templates, true))
|
||||
load_template( WPINC . '/theme-compat/sidebar.php');
|
||||
load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1023,7 +1023,7 @@ function get_comments_popup_template() {
|
|||
|
||||
// Backward compat code will be removed in a future release
|
||||
if ('' == $template)
|
||||
$template = WPINC . '/theme-compat/comments-popup.php';
|
||||
$template = ABSPATH . WPINC . '/theme-compat/comments-popup.php';
|
||||
|
||||
return apply_filters('comments_popup_template', $template);
|
||||
}
|
||||
|
@ -1082,6 +1082,8 @@ function load_template( $_template_file, $require_once = true ) {
|
|||
if ( is_array( $wp_query->query_vars ) )
|
||||
extract( $wp_query->query_vars, EXTR_SKIP );
|
||||
|
||||
error_log( $_template_file );
|
||||
|
||||
if ( $require_once )
|
||||
require_once( $_template_file );
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue