~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-content/themes/twentyseventeen/comments.php

  • Committer: Barry Price
  • Date: 2019-02-22 03:51:26 UTC
  • mfrom: (1.2.12 upstream)
  • Revision ID: barry.price@canonical.com-20190222035126-o28k38qs8jfyjsxt
Merge WP5.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * This is the template that displays the area of the page that contains both the current comments
6
6
 * and the comment form.
7
7
 *
8
 
 * @link https://codex.wordpress.org/Template_Hierarchy
 
8
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
9
9
 *
10
10
 * @package WordPress
11
11
 * @subpackage Twenty_Seventeen
27
27
 
28
28
        <?php
29
29
        // You can start editing here -- including this comment!
30
 
        if ( have_comments() ) : ?>
 
30
        if ( have_comments() ) :
 
31
                ?>
31
32
                <h2 class="comments-title">
32
33
                        <?php
33
34
                        $comments_number = get_comments_number();
53
54
 
54
55
                <ol class="comment-list">
55
56
                        <?php
56
 
                                wp_list_comments( array(
57
 
                                        'avatar_size' => 100,
58
 
                                        'style'       => 'ol',
59
 
                                        'short_ping'  => true,
60
 
                                        'reply_text'  => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ),
61
 
                                ) );
 
57
                                wp_list_comments(
 
58
                                        array(
 
59
                                                'avatar_size' => 100,
 
60
                                                'style'       => 'ol',
 
61
                                                'short_ping'  => true,
 
62
                                                'reply_text'  => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ),
 
63
                                        )
 
64
                                );
62
65
                        ?>
63
66
                </ol>
64
67
 
65
 
                <?php the_comments_pagination( array(
66
 
                        'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>',
67
 
                        'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
68
 
                ) );
 
68
                <?php
 
69
                the_comments_pagination(
 
70
                        array(
 
71
                                'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>',
 
72
                                'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
 
73
                        )
 
74
                );
69
75
 
70
76
        endif; // Check for have_comments().
71
77
 
72
78
        // If comments are closed and there are comments, let's leave a little note, shall we?
73
 
        if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
 
79
        if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
 
80
                ?>
74
81
 
75
82
                <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyseventeen' ); ?></p>
76
 
        <?php
 
83
                <?php
77
84
        endif;
78
85
 
79
86
        comment_form();