Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r43154 r43571  
    15531553            'caption'    => '',
    15541554            'class'      => '',
    1555         ), $attr, 'caption'
     1555        ),
     1556        $attr,
     1557        'caption'
    15561558    );
    15571559
     
    17231725            'exclude'    => '',
    17241726            'link'       => '',
    1725         ), $attr, 'gallery'
     1727        ),
     1728        $attr,
     1729        'gallery'
    17261730    );
    17271731
     
    18981902 */
    18991903function wp_underscore_playlist_templates() {
    1900 ?>
     1904    ?>
    19011905<script type="text/html" id="tmpl-wp-playlist-current-item">
    19021906    <# if ( data.image ) { #>
     
    19371941    </div>
    19381942</script>
    1939 <?php
     1943    <?php
    19401944}
    19411945
     
    19501954    wp_enqueue_style( 'wp-mediaelement' );
    19511955    wp_enqueue_script( 'wp-playlist' );
    1952 ?>
     1956    ?>
    19531957<!--[if lt IE 9]><script>document.createElement('<?php echo esc_js( $type ); ?>');</script><![endif]-->
    1954 <?php
     1958    <?php
    19551959    add_action( 'wp_footer', 'wp_underscore_playlist_templates', 0 );
    19561960    add_action( 'admin_footer', 'wp_underscore_playlist_templates', 0 );
     
    20402044            'images'       => true,
    20412045            'artists'      => true,
    2042         ), $attr, 'playlist'
     2046        ),
     2047        $attr,
     2048        'playlist'
    20432049    );
    20442050
     
    21892195                <?php
    21902196                echo (int) $theme_width;
    2191     ?>
     2197                ?>
    21922198    "
    21932199    <?php
     
    32953301        /** This filter is documented in wp-admin/includes/media.php */
    32963302        $possible_sizes = apply_filters(
    3297             'image_size_names_choose', array(
     3303            'image_size_names_choose',
     3304            array(
    32983305                'thumbnail' => __( 'Thumbnail' ),
    32993306                'medium'    => __( 'Medium' ),
     
    35613568            WHERE post_type = %s
    35623569            ORDER BY post_date DESC
    3563         ", 'attachment'
     3570        ",
     3571                'attachment'
    35643572            )
    35653573        );
     
    41274135    $data_to_export = array();
    41284136
    4129     $user = get_user_by( 'email' , $email_address );
     4137    $user = get_user_by( 'email', $email_address );
    41304138    if ( false === $user ) {
    41314139        return array(
     
    41524160        if ( $attachment_url ) {
    41534161            $post_data_to_export = array(
    4154                 array( 'name'  => __( 'URL' ), 'value' => $attachment_url ),
     4162                array(
     4163                    'name'  => __( 'URL' ),
     4164                    'value' => $attachment_url,
     4165                ),
    41554166            );
    41564167
Note: See TracChangeset for help on using the changeset viewer.