Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues. This change includes three notable additions: - Multiline function calls must now put each parameter on a new line. - Auto-formatting files is now part of the `grunt precommit` script. - Auto-fixable coding standards issues will now cause Travis failures. Fixes #44600. Built from https://develop.svn.wordpress.org/trunk@43571 git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -236,12 +236,12 @@ class Walker_Comment extends Walker {
|
||||
*/
|
||||
protected function ping( $comment, $depth, $args ) {
|
||||
$tag = ( 'div' == $args['style'] ) ? 'div' : 'li';
|
||||
?>
|
||||
?>
|
||||
<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( '', $comment ); ?>>
|
||||
<div class="comment-body">
|
||||
<?php _e( 'Pingback:' ); ?> <?php comment_author_link( $comment ); ?> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,7 +263,7 @@ class Walker_Comment extends Walker {
|
||||
$tag = 'li';
|
||||
$add_below = 'div-comment';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<<?php echo $tag; ?> <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?> id="comment-<?php comment_ID(); ?>">
|
||||
<?php if ( 'div' != $args['style'] ) : ?>
|
||||
<div id="div-comment-<?php comment_ID(); ?>" class="comment-body">
|
||||
@@ -272,7 +272,7 @@ class Walker_Comment extends Walker {
|
||||
<?php
|
||||
if ( 0 != $args['avatar_size'] ) {
|
||||
echo get_avatar( $comment, $args['avatar_size'] );}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: comment author link */
|
||||
printf(
|
||||
@@ -290,29 +290,32 @@ class Walker_Comment extends Walker {
|
||||
<?php
|
||||
/* translators: 1: comment date, 2: comment time */
|
||||
printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() );
|
||||
?>
|
||||
?>
|
||||
</a>
|
||||
<?php
|
||||
edit_comment_link( __( '(Edit)' ), ' ', '' );
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
comment_text(
|
||||
$comment, array_merge(
|
||||
$args, array(
|
||||
$comment,
|
||||
array_merge(
|
||||
$args,
|
||||
array(
|
||||
'add_below' => $add_below,
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
?>
|
||||
|
||||
<?php
|
||||
comment_reply_link(
|
||||
array_merge(
|
||||
$args, array(
|
||||
$args,
|
||||
array(
|
||||
'add_below' => $add_below,
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
@@ -326,7 +329,7 @@ class Walker_Comment extends Walker {
|
||||
<?php if ( 'div' != $args['style'] ) : ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -342,7 +345,7 @@ class Walker_Comment extends Walker {
|
||||
*/
|
||||
protected function html5_comment( $comment, $depth, $args ) {
|
||||
$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
|
||||
?>
|
||||
?>
|
||||
<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>
|
||||
<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
|
||||
<footer class="comment-meta">
|
||||
@@ -350,7 +353,7 @@ class Walker_Comment extends Walker {
|
||||
<?php
|
||||
if ( 0 != $args['avatar_size'] ) {
|
||||
echo get_avatar( $comment, $args['avatar_size'] );}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: comment author link */
|
||||
printf(
|
||||
@@ -384,7 +387,8 @@ class Walker_Comment extends Walker {
|
||||
<?php
|
||||
comment_reply_link(
|
||||
array_merge(
|
||||
$args, array(
|
||||
$args,
|
||||
array(
|
||||
'add_below' => 'div-comment',
|
||||
'depth' => $depth,
|
||||
'max_depth' => $args['max_depth'],
|
||||
@@ -395,6 +399,6 @@ class Walker_Comment extends Walker {
|
||||
);
|
||||
?>
|
||||
</article><!-- .comment-body -->
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user