Passed
Pull Request — master (#312)
by Warwick
02:11
created
comments.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -5,35 +5,35 @@  discard block
 block discarded – undo
5 5
  * @package lsx
6 6
  */
7 7
 
8
-if ( post_password_required() ) {
8
+if (post_password_required()) {
9 9
 	return;
10 10
 }
11 11
 
12 12
 $commenter = wp_get_current_commenter();
13
-$req       = get_option( 'require_name_email' );
14
-$aria_req  = ( $req ? " aria-required='true'" : '' );
15
-$html_req  = ( $req ? " required='required'" : '' );
13
+$req       = get_option('require_name_email');
14
+$aria_req  = ($req ? " aria-required='true'" : '');
15
+$html_req  = ($req ? " required='required'" : '');
16 16
 
17 17
 $comment_form_args = array(
18
-	'comment_field' => '<p class="comment-form-comment"><textarea placeholder="' . esc_html__( 'Comment', 'lsx' ) . '" id="comment" class="form-control" name="comment" cols="45" rows="8"' . $aria_req . $html_req . '></textarea></p>',
18
+	'comment_field' => '<p class="comment-form-comment"><textarea placeholder="' . esc_html__('Comment', 'lsx') . '" id="comment" class="form-control" name="comment" cols="45" rows="8"' . $aria_req . $html_req . '></textarea></p>',
19 19
 
20 20
 	'fields'        => array(
21
-		'author' => '<p class="comment-form-author"><label for="author">' . esc_html__( 'Name', 'lsx' ) . '</label> ' .
22
-			( $req ? '<span class="required">*</span>' : '' ) .
23
-			'<input class="form-control" placeholder="' . esc_html__( 'Name', 'lsx' ) . '" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . $html_req . '></p>',
21
+		'author' => '<p class="comment-form-author"><label for="author">' . esc_html__('Name', 'lsx') . '</label> ' .
22
+			($req ? '<span class="required">*</span>' : '') .
23
+			'<input class="form-control" placeholder="' . esc_html__('Name', 'lsx') . '" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . $html_req . '></p>',
24 24
 
25
-		'email'  => '<p class="comment-form-email"><label for="email">' . esc_html__( 'Email', 'lsx' ) . '</label> ' .
26
-			( $req ? '<span class="required">*</span>' : '' ) .
27
-			'<input class="form-control" placeholder="' . esc_html__( 'Email', 'lsx' ) . '" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . $html_req . '></p>',
25
+		'email'  => '<p class="comment-form-email"><label for="email">' . esc_html__('Email', 'lsx') . '</label> ' .
26
+			($req ? '<span class="required">*</span>' : '') .
27
+			'<input class="form-control" placeholder="' . esc_html__('Email', 'lsx') . '" id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . $html_req . '></p>',
28 28
 
29
-		'url'    => '<p class="comment-form-url"><label for="url">' . esc_html__( 'Website', 'lsx' ) . '</label>' .
30
-			'<input class="form-control" placeholder="' . esc_html__( 'Website', 'lsx' ) . '" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></p>',
29
+		'url'    => '<p class="comment-form-url"><label for="url">' . esc_html__('Website', 'lsx') . '</label>' .
30
+			'<input class="form-control" placeholder="' . esc_html__('Website', 'lsx') . '" id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30"></p>',
31 31
 	),
32 32
 );
33 33
 
34
-comment_form( $comment_form_args );
34
+comment_form($comment_form_args);
35 35
 
36
-if ( have_comments() ) : ?>
36
+if (have_comments()) : ?>
37 37
 
38 38
 	<?php lsx_comments_before(); ?>
39 39
 
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 			<?php
43 43
 				$comments_number = get_comments_number();
44 44
 
45
-			if ( '1' === $comments_number ) {
45
+			if ('1' === $comments_number) {
46 46
 				printf(
47 47
 					/* Translators: %s: post title */
48
-					esc_html_x( 'One Response to &ldquo;%s&rdquo;', 'comments.php', 'lsx' ),
48
+					esc_html_x('One Response to &ldquo;%s&rdquo;', 'comments.php', 'lsx'),
49 49
 					get_the_title()
50 50
 				);
51 51
 			} else {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 							'lsx'
61 61
 						)
62 62
 					),
63
-					esc_html( number_format_i18n( $comments_number ) ),
63
+					esc_html(number_format_i18n($comments_number)),
64 64
 					get_the_title()
65 65
 				);
66 66
 			}
@@ -79,24 +79,24 @@  discard block
 block discarded – undo
79 79
 
80 80
 		<?php
81 81
 		$comment_pages_count = get_comment_pages_count();
82
-		if ( $comment_pages_count > 1 && get_option( 'page_comments' ) ) :
82
+		if ($comment_pages_count > 1 && get_option('page_comments')) :
83 83
 			?>
84 84
 			<nav>
85 85
 				<ul class="pager">
86
-					<?php if ( get_previous_comments_link() ) : ?>
87
-						<li class="previous"><?php previous_comments_link( esc_html__( '&larr; Older comments', 'lsx' ) ); ?></li>
86
+					<?php if (get_previous_comments_link()) : ?>
87
+						<li class="previous"><?php previous_comments_link(esc_html__('&larr; Older comments', 'lsx')); ?></li>
88 88
 					<?php endif; ?>
89 89
 
90
-					<?php if ( get_next_comments_link() ) : ?>
91
-						<li class="next"><?php next_comments_link( esc_html__( 'Newer comments &rarr;', 'lsx' ) ); ?></li>
90
+					<?php if (get_next_comments_link()) : ?>
91
+						<li class="next"><?php next_comments_link(esc_html__('Newer comments &rarr;', 'lsx')); ?></li>
92 92
 					<?php endif; ?>
93 93
 				</ul>
94 94
 			</nav>
95 95
 		<?php endif; ?>
96 96
 
97
-		<?php if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
97
+		<?php if ( ! comments_open() && ! is_page() && post_type_supports(get_post_type(), 'comments')) : ?>
98 98
 			<div class="alert alert-warning">
99
-				<?php esc_html_e( 'Comments are closed.', 'lsx' ); ?>
99
+				<?php esc_html_e('Comments are closed.', 'lsx'); ?>
100 100
 			</div>
101 101
 		<?php endif; ?>
102 102
 	</section><!-- /#comments -->
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 
106 106
 <?php endif; ?>
107 107
 
108
-<?php if ( ! have_comments() && ! comments_open() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
108
+<?php if ( ! have_comments() && ! comments_open() && post_type_supports(get_post_type(), 'comments')) : ?>
109 109
 
110 110
 	<section id="comments">
111 111
 		<div class="alert alert-warning">
112
-			<?php esc_html_e( 'Comments are closed.', 'lsx' ); ?>
112
+			<?php esc_html_e('Comments are closed.', 'lsx'); ?>
113 113
 		</div>
114 114
 	</section><!-- /#comments -->
115 115
 
Please login to merge, or discard this patch.