* @copyright Copyright (c) 2013, Nicolas GUILLAUME * @link http://themesandco.com/customizr * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ if ( ! class_exists( 'TC_comments' ) ) : class TC_comments { static $instance; function __construct () { self::$instance =& $this; add_action ( '__after_loop' , array( $this , 'tc_comments' ), 10 ); add_action ( '__comment' , array( $this , 'tc_comment_title' ), 10 ); add_action ( '__comment' , array( $this , 'tc_comment_list' ), 20 ); add_action ( '__comment' , array( $this , 'tc_comment_navigation' ), 30 ); add_action ( '__comment' , array( $this , 'tc_comment_close' ), 40 ); } /** * Main commments template * * @package Customizr * @since Customizr 3.0.10 */ function tc_comments() { //By default not displayed on home, for protected posts, and if no comments for page option is checked $comments_bool = ( post_password_required() || tc__f( '__is_home' ) || ( is_page() && 1 != esc_attr( tc__f( '__get_option' , 'tc_page_comments' )) ) ) ? false : true; if ( !apply_filters('tc_show_comments', $comments_bool ) ) return; comments_template( '' , true ); } /** * Comment title rendering * * @package Customizr * @since Customizr 3.0 */ function tc_comment_title() { echo apply_filters( 'tc_comment_title' , sprintf( '

%1$s

' , sprintf( _n( 'One thought on “%2$s”' , '%1$s thoughts on “%2$s”' , get_comments_number(), 'customizr' ), number_format_i18n( get_comments_number(), 'customizr' ), '' . get_the_title() . '' ) ) ); } /** * Comment list Rendering * * @package Customizr * @since Customizr 3.0 */ function tc_comment_list() { ob_start(); ?> comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ' , '' ); ?>

  • id="li-comment-"> filter parameter! $comment_text = get_comment_text( $comment->comment_ID , $args ); printf('
    %3$s
    %5$s %6$s %7$s %8$s
    ', apply_filters( 'tc_comment_wrapper_class', 'row-fluid' ), apply_filters( 'tc_comment_avatar_class', 'comment-avatar span2' ), get_avatar( $comment, apply_filters( 'tc_comment_avatar_size', 80 ) ), apply_filters( 'tc_comment_content_class', 'span10' ), $tc_show_comment_content ? sprintf('
    %2$s
    ', apply_filters( 'tc_comment_reply_btn_class', 'reply btn btn-small' ), get_comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply' , 'customizr' ).' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] , 'add_below' => apply_filters( 'tc_comment_reply_below' , 'li-comment' ) ) ) ) ) : '', sprintf('
    %1$s %2$s
    ', sprintf( '%1$s %2$s %3$s' , get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? ' ' . __( 'Post author' , 'customizr' ) . '' : '' , current_user_can( 'edit_comment', $comment->comment_ID ) ? '' : '' ), sprintf( '' , esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s' , 'customizr' ), get_comment_date(), get_comment_time() ) ) ), ( '0' == $comment->comment_approved ) ? sprintf('

    %1$s

    ', __( 'Your comment is awaiting moderation.' , 'customizr' ) ) : '', sprintf('
    %1$s
    ', apply_filters( 'comment_text', $comment_text, $comment, $args ) ), $comment->comment_ID );//end printf ?> 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ob_start(); ?> %1$s

    ', __( 'Comments are closed.' , 'customizr' ) ) ); endif; } }//end class endif;