File: /home/kashmira/www/razitahir.com/wp-content/themes/upress/comments.php
<?php
/**
* The template for displaying comments.
* @package UrduPaper
*/
if ( post_password_required() ) {
return;
}
$translation = upress_translation();
?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( '”%2$s“ ایک '.$translation['meta']['comment'].'', '%1$s '.$translation['meta']['comments'].' ”%2$s“', get_comments_number(), 'comments title', 'urdupress' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( $translation['forms']['nav_heading'], 'urdupress' ); ?></h2>
<div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( esc_html__( $translation['forms']['nav_prev_btn'], 'urdupress' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( $translation['forms']['nav_next_btn'], 'urdupress' ) ); ?></div>
</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
<?php endif; // Check for comment navigation. ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'max_depth' => 3,
'per_page' => 10,
'avatar_size' => 70,
) );
?>
</ol><!-- .comment-list -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( $translation['forms']['nav_heading'], 'urdupress' ); ?></h2>
<div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( esc_html__( $translation['forms']['nav_prev_btn'], 'urdupress' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( $translation['forms']['nav_next_btn'], 'urdupress' ) ); ?></div>
</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
<?php endif; // Check for comment navigation. ?>
<?php endif; // Check for have_comments(). ?>
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php esc_html_e( $translation['forms']['comment_closed'], 'urdupress' ); ?></p>
<?php endif; ?>
<?php
$comment_args = array(
'title_reply'=> $translation['forms']['comment_field_textarea'],
'fields' => apply_filters( 'comment_form_default_fields', array(
'author' => '<div class="comment-form-field">' . '<label for="author">' . __( $translation['forms']['comment_field_name'] ) . '<span>*</span></label>' .
'<input id="author" name="author" type="text" class="field" wrap="soft" onKeyPress="processKeypresses()" onClick="storeCaret(this)" onKeyUp="storeCaret(this)" onkeydown="processKeydown()" onFocus="setEditor(this)" value="' . esc_attr( $commenter['comment_author'] ) . '" size="40" /></div>',
'email' => '<div class="comment-form-field">' .
'<label for="email">' . __( $translation['forms']['comment_field_email'] ) . '<span>*</span></label> ' .
'<input id="email" name="email" type="text" class="field" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="40" />'.'</div>',
'url' => ''
)
),
'comment_field' => '<div class="comment-form-field">' .
'<label for="comment">' . __( $translation['forms']['comment_field_textarea'] ) . '</label>' .
'<textarea id="comment" class="field" name="comment" cols="35" rows="4" wrap="soft" onKeyPress="processKeypresses()" onClick="storeCaret(this)" onKeyUp="storeCaret(this)" onkeydown="processKeydown()" onFocus="setEditor(this)" draggable="false" style="font-size:24px; font-family:Jameel Nastaleeq;"></textarea>' .
'</div>',
'comment_notes_after' => '',
'comment_notes_before' => '<h4 class="email-note">'.$translation['forms']['comment_box_notice'].'</h4>',
'label_submit' => $translation['forms']['comment_button'],
'title_reply_before' => '<div id="reply-title" class="comment-reply-title">',
'title_reply_to' => 'کو جواب دیں',
'title_reply_after' => '</div>',
);
comment_form( $comment_args );
?>
</div><!-- #comments -->