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:
Gary Pendergast
2018-08-17 01:51:36 +00:00
parent 8142df82bc
commit 56c162fbc9
359 changed files with 5715 additions and 4599 deletions

View File

@@ -23,7 +23,7 @@ $title = __( 'Export' );
* @since 3.5.0
*/
function export_add_js() {
?>
?>
<script type="text/javascript">
jQuery(document).ready(function($){
var form = $('#export-filters'),
@@ -39,7 +39,7 @@ function export_add_js() {
});
});
</script>
<?php
<?php
}
add_action( 'admin_head', 'export_add_js' );
@@ -144,7 +144,8 @@ function export_date_options( $post_type = 'post' ) {
FROM $wpdb->posts
WHERE post_type = %s AND post_status != 'auto-draft'
ORDER BY post_date DESC
", $post_type
",
$post_type
)
);
@@ -224,7 +225,7 @@ function export_date_options( $post_type = 'post' ) {
<?php
$post_stati = get_post_stati( array( 'internal' => false ), 'objects' );
foreach ( $post_stati as $status ) :
?>
?>
<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
<?php endforeach; ?>
</select>
@@ -280,9 +281,10 @@ foreach ( get_post_types(
array(
'_builtin' => false,
'can_export' => true,
), 'objects'
),
'objects'
) as $post_type ) :
?>
?>
<p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
<?php endforeach; ?>