Look for template files in the stylesheet folder as well as the template folder for inheriting themes. Fixes #7086 props ionfish.

git-svn-id: https://develop.svn.wordpress.org/trunk@8497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2008-07-30 06:21:14 +00:00
parent ba35a97bb5
commit 8b8928d5ac
3 changed files with 57 additions and 15 deletions
+5 -2
View File
@@ -664,11 +664,14 @@ function comments_template( $file = '/comments.php' ) {
update_comment_cache($comments);
define('COMMENTS_TEMPLATE', true);
$include = apply_filters('comments_template', TEMPLATEPATH . $file );
$include = apply_filters('comments_template', STYLESHEETPATH . $file );
if ( file_exists( $include ) )
require( $include );
elseif ( file_exists( TEMPLATEPATH . $file ) )
require( TEMPLATEPATH . $file );
else
require( WP_CONTENT_DIR . '/themes/default/comments.php');
require( get_theme_root() . '/default/comments.php');
}
/**