Skip to content

Commit cb42d72

Browse files
Coding Standards: Correct equals sign alignment in various files.
This resolves a few WPCS warnings: {{{ Equals sign not aligned with surrounding statements }}} so that the output of `composer format` is clean. Follow-up to [55971], [56033], [56056], [56143], [56214]. Props jrf. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56273 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0c97999 commit cb42d72

6 files changed

Lines changed: 15 additions & 8 deletions

File tree

src/wp-admin/includes/class-wp-debug-data.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,11 +846,12 @@ public static function debug_data() {
846846

847847
// Server time.
848848
$date = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
849-
$info['wp-server']['fields']['current'] = array(
849+
850+
$info['wp-server']['fields']['current'] = array(
850851
'label' => __( 'Current time' ),
851852
'value' => $date->format( DateTime::ATOM ),
852853
);
853-
$info['wp-server']['fields']['utc-time'] = array(
854+
$info['wp-server']['fields']['utc-time'] = array(
854855
'label' => __( 'Current UTC time' ),
855856
'value' => $date->format( DateTime::RFC850 ),
856857
);

src/wp-admin/includes/class-wp-ms-sites-list-table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,15 @@ public function get_columns() {
391391
protected function get_sortable_columns() {
392392

393393
if ( is_subdomain_install() ) {
394-
$abbr = __( 'Domain' );
394+
$blogname_abbr = __( 'Domain' );
395395
$blogname_orderby_text = __( 'Table ordered by Site Domain Name.' );
396396
} else {
397-
$abbr = __( 'Path' );
397+
$blogname_abbr = __( 'Path' );
398398
$blogname_orderby_text = __( 'Table ordered by Site Path.' );
399399
}
400400

401401
return array(
402-
'blogname' => array( 'blogname', false, $abbr, $blogname_orderby_text ),
402+
'blogname' => array( 'blogname', false, $blogname_abbr, $blogname_orderby_text ),
403403
'lastupdated' => array( 'lastupdated', true, __( 'Last Updated' ), __( 'Table ordered by Last Updated.' ) ),
404404
'registered' => array( 'blog_id', true, _x( 'Registered', 'site' ), __( 'Table ordered by Site Registered Date.' ), 'desc' ),
405405
);

src/wp-admin/includes/class-wp-posts-list-table.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,12 @@ protected function get_sortable_columns() {
764764
$post_type = $this->screen->post_type;
765765

766766
if ( 'page' === $post_type ) {
767-
$title_orderby_text = isset( $_GET['orderby'] ) ? __( 'Table ordered by Title.' ) : __( 'Table ordered by Hierarchical Menu Order and Title.' );
767+
if ( isset( $_GET['orderby'] ) ) {
768+
$title_orderby_text = __( 'Table ordered by Title.' );
769+
} else {
770+
$title_orderby_text = __( 'Table ordered by Hierarchical Menu Order and Title.' );
771+
}
772+
768773
$sortables = array(
769774
'title' => array( 'title', false, __( 'Title' ), $title_orderby_text, 'asc' ),
770775
'parent' => array( 'parent', false ),

src/wp-includes/class-wp-scripts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ private function filter_eligible_strategies( $handle, $eligible = null, $checked
964964
return $eligible;
965965
}
966966

967-
$is_alias = (bool) ! $this->registered[ $handle ]->src;
967+
$is_alias = (bool) ! $this->registered[ $handle ]->src;
968968
$intended_strategy = $this->get_data( $handle, 'strategy' );
969969

970970
// For non-alias handles, an empty intended strategy filters all strategies.

src/wp-includes/media.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5620,6 +5620,7 @@ function wp_get_loading_optimization_attributes( $tag_name, $attr, $context ) {
56205620
}
56215621
return $loading_attributes;
56225622
};
5623+
56235624
// Closure to increase media count for images with certain minimum threshold, mostly used for header images.
56245625
$maybe_increase_content_media_count = static function() use ( $attr ) {
56255626
/** This filter is documented in wp-admin/includes/media.php */

src/wp-includes/shortcodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function do_shortcode( $content, $ignore_html = false ) {
222222
}
223223

224224
// Ensure this context is only added once if shortcodes are nested.
225-
$has_filter = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
225+
$has_filter = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' );
226226
$filter_added = false;
227227

228228
if ( ! $has_filter ) {

0 commit comments

Comments
 (0)