File: /virtual/nagasaki/public_html/shop/wp-content/themes/riffles_ver1.1/comments-item.php
<?php
/**
* @package Riffles
* @link http://www.u-hg.com/
* @author RiffleHatch
* @copyright Copyright (c)2014 RiffleHatch
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php // You can start editing here -- including this comment! ?>
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _nx( '“%2$s”に1件のレビュー', '“%2$s”に%1$s件のレビュー', get_comments_number(), 'comments title', 'riffles' ),
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="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'riffles' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'riffles' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'riffles' ) ); ?></div>
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
) );
?>
</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="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'riffles' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'riffles' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'riffles' ) ); ?></div>
</nav><!-- #comment-nav-below -->
<?php endif; // check for comment navigation ?>
<?php endif; // 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 _e( 'Comments are closed.', 'riffles' ); ?></p>
<?php endif; ?>
<?php
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array(
'author' => '<p id="inputtext">' . '<label for="author">お名前(ハンドルネーム可)'
. ( $req ? ' <span>*</span>' : '' ) . '</label> ' .
'<input id="author" name="author" type="text" value="'
. esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
'email' => '<p id="inputtext"><label for="email">' . __( 'Email' )
. ( $req ? ' <span>*</span>' : '' ) . '</label> ' .
'<input id="email" name="email" type="email" value="'
. esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
'url' => '',
);
$comment_field = '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '(必須)</label><br /><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>';
$comment_notes_before = NULL;
$args = array(
'fields' => apply_filters( 'comment_form_default_fields', $fields ),
'title_reply' => 'この商品のレビューを投稿する',
'comment_field' => $comment_field,
'comment_notes_before' => '<p>メールアドレスは公開されません。いたずら防止のため承認制を取らせて頂いております。</p>',
'comment_notes_after' => '<p>内容をご確認の上、「レビューを送信する」ボタンから送信下さいませ。</p>',
'label_submit' => 'レビューを送信',
);
?>
<?php comment_form($args); ?>
</div><!-- #comments -->