diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-07 13:06:14 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-07 13:06:14 +0100 |
| commit | 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 (patch) | |
| tree | f7453d7dd5cbaaab246e23810b02d3edf1e451be /srcs/wordpress/wp-content/themes/twentyseventeen/comments.php | |
| parent | c59bdcf77c50cbe89b4a93782cdd6d9e7532080e (diff) | |
| download | ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.gz ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.bz2 ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.zip | |
Added wordpress
Diffstat (limited to 'srcs/wordpress/wp-content/themes/twentyseventeen/comments.php')
| -rw-r--r-- | srcs/wordpress/wp-content/themes/twentyseventeen/comments.php | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/comments.php b/srcs/wordpress/wp-content/themes/twentyseventeen/comments.php new file mode 100644 index 0000000..7e8e988 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/comments.php @@ -0,0 +1,89 @@ +<?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_Seventeen + * @since 1.0 + * @version 1.0 + */ + +/* + * If the current post is protected by a password and + * the visitor has not yet entered the password we will + * return early without loading the comments. + */ +if ( post_password_required() ) { + return; +} +?> + +<div id="comments" class="comments-area"> + + <?php + // You can start editing here -- including this comment! + if ( have_comments() ) : + ?> + <h2 class="comments-title"> + <?php + $comments_number = get_comments_number(); + if ( '1' === $comments_number ) { + /* translators: %s: Post title. */ + printf( _x( 'One Reply to “%s”', 'comments title', 'twentyseventeen' ), get_the_title() ); + } else { + printf( + /* translators: 1: Number of comments, 2: Post title. */ + _nx( + '%1$s Reply to “%2$s”', + '%1$s Replies to “%2$s”', + $comments_number, + 'comments title', + 'twentyseventeen' + ), + number_format_i18n( $comments_number ), + get_the_title() + ); + } + ?> + </h2> + + <ol class="comment-list"> + <?php + wp_list_comments( + array( + 'avatar_size' => 100, + 'style' => 'ol', + 'short_ping' => true, + 'reply_text' => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ), + ) + ); + ?> + </ol> + + <?php + the_comments_pagination( + array( + 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>', + 'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), + ) + ); + + endif; // Check for have_comments(). + + // If comments are closed and there are comments, let's leave a little note, shall we? + if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : + ?> + + <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyseventeen' ); ?></p> + <?php + endif; + + comment_form(); + ?> + +</div><!-- #comments --> |
