Allow custom comment template - http://mosquito.wordpress.org/view.php?id=632
git-svn-id: https://develop.svn.wordpress.org/trunk@2289 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fd66fc02c6
commit
ddc38cc3cf
@ -2,7 +2,7 @@
|
||||
|
||||
// Template functions
|
||||
|
||||
function comments_template() {
|
||||
function comments_template( $file = '/comments.php' ) {
|
||||
global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity;
|
||||
|
||||
if ( is_single() || is_page() || $withcomments ) :
|
||||
@ -20,8 +20,8 @@ function comments_template() {
|
||||
|
||||
get_currentuserinfo();
|
||||
|
||||
if ( file_exists( TEMPLATEPATH . '/comments.php') )
|
||||
require( TEMPLATEPATH . '/comments.php');
|
||||
if ( file_exists( TEMPLATEPATH . $file ) )
|
||||
require( TEMPLATEPATH . $file );
|
||||
else
|
||||
require( ABSPATH . 'wp-content/themes/default/comments.php');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user