<?php /** * The template for displaying comments * * This is the template that displays the area of the page that contains both the current comments * and the comment form. * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /* * If the current post is protected by a password and * the visitor has not yet entered the password, * return early without loading the comments. */ if ( post_password_required() ) { return; } $twenty_twenty_one_comment_count = get_comments_number(); ?> <div id="comments" class="comments-area default-max-width <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>"> <?php if ( have_comments() ) : ?> <h2 class="comments-title"> <?php if ( '1' === $twenty_twenty_one_comment_count ) : ?> <?php esc_html_e( '1 comment', 'twentytwentyone' ); ?> <?php else : ?> <?php printf( /* translators: %s: Comment count number. */ esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ), esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) ) ); ?> <?php endif; ?> </h2><!-- .comments-title --> <ol class="comment-list"> <?php wp_list_comments( array( 'avatar_size' => 60, 'style' => 'ol', 'short_ping' => true, ) ); ?> </ol><!-- .comment-list --> <?php the_comments_pagination( array( 'before_page_number' => esc_html__( 'Page', 'twentytwentyone' ) . ' ', 'mid_size' => 0, 'prev_text' => sprintf( '%s <span class="nav-prev-text">%s</span>', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), esc_html__( 'Older comments', 'twentytwentyone' ) ), 'next_text' => sprintf( '<span class="nav-next-text">%s</span> %s', esc_html__( 'Newer comments', 'twentytwentyone' ), is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) ), ) ); ?> <?php if ( ! comments_open() ) : ?> <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'twentytwentyone' ); ?></p> <?php endif; ?> <?php endif; ?> <?php comment_form( array( 'title_reply' => esc_html__( 'Leave a comment', 'twentytwentyone' ), 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', 'title_reply_after' => '</h2>', ) ); ?> </div><!-- #comments -->
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
assets | Folder | 0755 |
|
|
classes | Folder | 0755 |
|
|
inc | Folder | 0755 |
|
|
template-parts | Folder | 0755 |
|
|
404.php | File | 721 B | 0644 |
|
archive.php | File | 995 B | 0644 |
|
comments.php | File | 2.57 KB | 0644 |
|
footer.php | File | 2.2 KB | 0644 |
|
functions.php | File | 18.84 KB | 0644 |
|
functionsbak.php | File | 18.91 KB | 0644 |
|
header.php | File | 1 KB | 0644 |
|
image.php | File | 3.37 KB | 0644 |
|
index.php | File | 1.17 KB | 0644 |
|
package-lock.json | File | 607.44 KB | 0644 |
|
package.json | File | 2.46 KB | 0644 |
|
page.php | File | 590 B | 0644 |
|
postcss.config.js | File | 319 B | 0644 |
|
readme.txt | File | 5.86 KB | 0644 |
|
screenshot.png | File | 276.27 KB | 0644 |
|
search.php | File | 1.61 KB | 0644 |
|
searchform.php | File | 1.4 KB | 0644 |
|
single.php | File | 1.66 KB | 0644 |
|
style-rtl.css | File | 152.36 KB | 0644 |
|
style.css | File | 152.66 KB | 0644 |
|
style.css.map | File | 22.97 KB | 0644 |
|