Files
gustavoo-me/wp-content/themes/gustavoo-portfolio/comments.php
T
2026-07-23 22:56:30 -03:00

66 lines
1.9 KiB
PHP

<?php
/**
* Comments template.
*
* @package Gustavo_Portfolio
*/
if ( post_password_required() ) {
return;
}
?>
<section id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
$gustavoo_comment_count = get_comments_number();
printf(
/* translators: 1: comment count, 2: post title. */
esc_html( _n( '%1$s comentário em “%2$s”', '%1$s comentários em “%2$s”', $gustavoo_comment_count, 'gustavoo-portfolio' ) ),
esc_html( number_format_i18n( $gustavoo_comment_count ) ),
esc_html( get_the_title() )
);
?>
</h2>
<ol class="comment-list">
<?php
wp_list_comments(
array(
'avatar_size' => 64,
'short_ping' => true,
'style' => 'ol',
)
);
?>
</ol>
<?php
the_comments_navigation(
array(
'prev_text' => sprintf( '<span aria-hidden="true">←</span> %s', esc_html__( 'Comentários anteriores', 'gustavoo-portfolio' ) ),
'next_text' => sprintf( '%s <span aria-hidden="true">→</span>', esc_html__( 'Próximos comentários', 'gustavoo-portfolio' ) ),
)
);
?>
<?php endif; ?>
<?php if ( ! comments_open() && get_comments_number() ) : ?>
<p class="no-comments"><?php esc_html_e( 'Os comentários estão encerrados.', 'gustavoo-portfolio' ); ?></p>
<?php endif; ?>
<?php
comment_form(
array(
'class_submit' => 'submit button button--primary',
'label_submit' => __( 'Publicar comentário', 'gustavoo-portfolio' ),
'title_reply' => __( 'Deixe um comentário', 'gustavoo-portfolio' ),
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h2>',
'comment_notes_before' => '<p class="comment-notes">' . esc_html__( 'Seu endereço de e-mail não será publicado. Campos obrigatórios são indicados.', 'gustavoo-portfolio' ) . '</p>',
)
);
?>
</section>