You are on page 1of 3

<?

php
/*----------------------------------------------------------------------------------*/
/* Comments Block
/*----------------------------------------------------------------------------------*/
?>
<div class="comments-area">
<!-- Comments title -->
<h3 class="left" style="margin-top:5px"><?php
/**
* Get comments number with a function
* See more in framework/theme/bd-functions.php
*/
_e(bd_comment_number(false), 'bd'); ?></h3>
<!-- "Leave a comment" scroll link -->
<p class="right text-right" style="margin-top:10px">
<a href="#reply-form" class="scroll effect"><?php _e('Le
ave us a comment', 'bd'); ?></a>
</p>
<div class="clear"></div>
<hr>
<!-- Comments start here -->
<div id="comments">
<?php
/* If is password protected ---------------------------------------------------------*/
if ( post_password_required() ) :
?>
<p class="nopassword"><?php _e( 'This post is pa
ssword protected. Enter the password to view any comments.', 'bd' ); ?></p>
</div><!-- #comments -->
<?php
/* Stop the rest of comments.php from be
ing processed,
* but don't kill the script entirely -we still have
* to fully load the template.
*/
return;
endif;
?>
<?php if ( have_comments() ) :
if ( get_comment_pages_count() > 1 && get_option
( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above">
<p class="left"><?php previous_comments_
link( __( '&larr; Older Comments', 'bd' ) ); ?></p>
<p class="right"><?php next_comments_lin
k( __( 'Newer Comments &rarr;', 'bd' ) ); ?></p>
<div class="clear"></div>
</nav>
<?php endif; // check for comment navigation ?>

<ul class="commentlist">
<?php
/* Loop through and list the com
ments. Tell wp_list_comments()
* to use bd_comment() to format
the comments.
* See bd_comment() in includes/
theme-template-tags.php for more.
*/
wp_list_comments( array( 'callba
ck' => 'bd_comment' ) );
?>
</ul>
<?php if ( get_comment_pages_count() > 1 && get_
option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above">
<p class="left"><?php previous_comments_
link( __( '&larr; Older Comments', 'bd' ) ); ?></p>
<p class="right"><?php next_comments_lin
k( __( 'Newer Comments &rarr;', 'bd' ) ); ?></p>
<div class="clear"></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php
/* If there are no comments and comments are clo
sed, let's leave a little note, shall we?
* But we don't want the note on pages or post t
ypes that do not support comments.
*/
elseif ( ! comments_open() && ! is_page() && pos
t_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="nocomments"><?php _e( 'Comments are cl
osed.', 'bd' ); ?></p>
<?php else: ?>
<p><?php _e( 'No comment posted yet', 'bd' ); ?>.</p>
<?php endif; ?>
<div class="clear"></div>
<div id="reply-form"></div>
<?php
/*----------------------------------------------------------------------------------*/
/*
Comment Form
/*----------------------------------------------------------------------------------*/
if ( comments_open() ) : ?>
<div class="respond">
<div class="entry-icon"></div>
<?php
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '
' );

$fields = array(
'comment_field' => '<p class="comment-fo
rm-comment"><textarea id="comment" name="comment" cols="45" rows="8" aria-requir
ed="true"></textarea></p>',
'must_log_in' => '<p class="must-log-in"
>' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.',
'bd' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '
</p>',
'logged_in_as' => '<p class="logged-in-a
s">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title=
"Log out of this account">Log out &raquo;</a>', 'bd' ), admin_url( 'profile.php'
), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink
( ) ) ) ) . '</p>',
'comment_notes_before' => '',
'comment_notes_after' => '',
'title_reply' => __('Leave a Comment', '
bd'),
'title_reply_to' => __('Leave a Reply to
%s', 'bd'),
'cancel_reply_link' => __('Cancel Reply'
, 'bd'),
'label_submit' => __('Submit', 'bd')
);
comment_form($fields); ?>
</div><!-- #respond -->
<?php endif; // end if comments open check ?>
</div><!-- #comments -->
<div class="clear"></div>
</div><!-- .comments-area -->

You might also like