Make WordPress Core

Changeset 55636


Ignore:
Timestamp:
04/08/2023 09:19:29 AM (16 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Apply various alignment corrections from composer format.

This fixes a few WPCS warnings along the lines of:

  • Array double arrow not aligned correctly
  • Equals sign not aligned with surrounding statements
  • Usage of ELSE IF is discouraged; use ELSEIF instead

Follow-up to [55099], [55192], [55194], [55271].

Props davidbaumwald, jrf, SergeyBiryukov.
Merges [55606] to the 6.2 branch.
Fixes #57994.

Location:
branches/6.2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/6.2

  • branches/6.2/src/wp-admin/user-edit.php

    r55414 r55636  
    350350
    351351                    <?php
    352                     $languages = get_available_languages();
     352                    $languages                = get_available_languages();
    353353                    $can_install_translations = current_user_can( 'install_languages' ) && wp_can_install_language_pack();
    354354                    ?>
     
    371371                            wp_dropdown_languages(
    372372                                array(
    373                                     'name'                        => 'locale',
    374                                     'id'                          => 'locale',
    375                                     'selected'                    => $user_locale,
    376                                     'languages'                   => $languages,
     373                                    'name'      => 'locale',
     374                                    'id'        => 'locale',
     375                                    'selected'  => $user_locale,
     376                                    'languages' => $languages,
    377377                                    'show_available_translations' => $can_install_translations,
    378                                     'show_option_site_default'    => true,
     378                                    'show_option_site_default' => true,
    379379                                )
    380380                            );
  • branches/6.2/src/wp-includes/block-template-utils.php

    r55501 r55636  
    13391339            $template_hierarchy[] = $type;
    13401340        }
    1341     } else if ( preg_match( '/^(author|category|archive|tag|page)-.+$/', $slug, $matches ) ) {
     1341    } elseif ( preg_match( '/^(author|category|archive|tag|page)-.+$/', $slug, $matches ) ) {
    13421342        $template_hierarchy[] = $matches[1];
    1343     } else if ( preg_match( '/^(taxonomy|single)-(.+)$/', $slug, $matches ) ) {
     1343    } elseif ( preg_match( '/^(taxonomy|single)-(.+)$/', $slug, $matches ) ) {
    13441344        $type           = $matches[1];
    13451345        $slug_remaining = $matches[2];
  • branches/6.2/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

    r55192 r55636  
    273273        }
    274274
    275         $result  = wp_update_post( wp_slash( (array) $changes ), true, false );
     275        $result = wp_update_post( wp_slash( (array) $changes ), true, false );
    276276        if ( is_wp_error( $result ) ) {
    277277            return $result;
  • branches/6.2/src/wp-includes/script-loader.php

    r55491 r55636  
    11091109    $scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.js", array( 'mediaelement' ), false, 1 );
    11101110    $mejs_settings = array(
    1111         'pluginPath'  => includes_url( 'js/mediaelement/', 'relative' ),
    1112         'classPrefix' => 'mejs-',
    1113         'stretching'  => 'responsive',
     1111        'pluginPath'            => includes_url( 'js/mediaelement/', 'relative' ),
     1112        'classPrefix'           => 'mejs-',
     1113        'stretching'            => 'responsive',
    11141114        /** This filter is documented in wp-includes/media.php */
    11151115        'audioShortcodeLibrary' => apply_filters( 'wp_audio_shortcode_library', 'mediaelement' ),
Note: See TracChangeset for help on using the changeset viewer.