From 3a065bfb2ceb1542caaf66c638278fd1db97f2bf Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 20 Jul 2023 00:06:21 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@56273 git-svn-id: http://core.svn.wordpress.org/trunk@55785 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-debug-data.php | 5 +++-- wp-admin/includes/class-wp-ms-sites-list-table.php | 6 +++--- wp-admin/includes/class-wp-posts-list-table.php | 7 ++++++- wp-includes/class-wp-scripts.php | 2 +- wp-includes/media.php | 1 + wp-includes/shortcodes.php | 2 +- wp-includes/version.php | 2 +- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index 8590cbbdb6..2cd930052f 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -846,11 +846,12 @@ class WP_Debug_Data { // Server time. $date = new DateTime( 'now', new DateTimeZone( 'UTC' ) ); - $info['wp-server']['fields']['current'] = array( + + $info['wp-server']['fields']['current'] = array( 'label' => __( 'Current time' ), 'value' => $date->format( DateTime::ATOM ), ); - $info['wp-server']['fields']['utc-time'] = array( + $info['wp-server']['fields']['utc-time'] = array( 'label' => __( 'Current UTC time' ), 'value' => $date->format( DateTime::RFC850 ), ); diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index 4e54862185..ec48bf37c7 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -391,15 +391,15 @@ class WP_MS_Sites_List_Table extends WP_List_Table { protected function get_sortable_columns() { if ( is_subdomain_install() ) { - $abbr = __( 'Domain' ); + $blogname_abbr = __( 'Domain' ); $blogname_orderby_text = __( 'Table ordered by Site Domain Name.' ); } else { - $abbr = __( 'Path' ); + $blogname_abbr = __( 'Path' ); $blogname_orderby_text = __( 'Table ordered by Site Path.' ); } return array( - 'blogname' => array( 'blogname', false, $abbr, $blogname_orderby_text ), + 'blogname' => array( 'blogname', false, $blogname_abbr, $blogname_orderby_text ), 'lastupdated' => array( 'lastupdated', true, __( 'Last Updated' ), __( 'Table ordered by Last Updated.' ) ), 'registered' => array( 'blog_id', true, _x( 'Registered', 'site' ), __( 'Table ordered by Site Registered Date.' ), 'desc' ), ); diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 54bd19441d..f3ef1d8e31 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -764,7 +764,12 @@ class WP_Posts_List_Table extends WP_List_Table { $post_type = $this->screen->post_type; if ( 'page' === $post_type ) { - $title_orderby_text = isset( $_GET['orderby'] ) ? __( 'Table ordered by Title.' ) : __( 'Table ordered by Hierarchical Menu Order and Title.' ); + if ( isset( $_GET['orderby'] ) ) { + $title_orderby_text = __( 'Table ordered by Title.' ); + } else { + $title_orderby_text = __( 'Table ordered by Hierarchical Menu Order and Title.' ); + } + $sortables = array( 'title' => array( 'title', false, __( 'Title' ), $title_orderby_text, 'asc' ), 'parent' => array( 'parent', false ), diff --git a/wp-includes/class-wp-scripts.php b/wp-includes/class-wp-scripts.php index 08aba0aa5d..cf0259c3c4 100644 --- a/wp-includes/class-wp-scripts.php +++ b/wp-includes/class-wp-scripts.php @@ -964,7 +964,7 @@ JS; return $eligible; } - $is_alias = (bool) ! $this->registered[ $handle ]->src; + $is_alias = (bool) ! $this->registered[ $handle ]->src; $intended_strategy = $this->get_data( $handle, 'strategy' ); // For non-alias handles, an empty intended strategy filters all strategies. diff --git a/wp-includes/media.php b/wp-includes/media.php index f4d6a5a67d..db5565e385 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -5620,6 +5620,7 @@ function wp_get_loading_optimization_attributes( $tag_name, $attr, $context ) { } return $loading_attributes; }; + // Closure to increase media count for images with certain minimum threshold, mostly used for header images. $maybe_increase_content_media_count = static function() use ( $attr ) { /** This filter is documented in wp-admin/includes/media.php */ diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index 4d23521f44..538b6e79da 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -222,7 +222,7 @@ function do_shortcode( $content, $ignore_html = false ) { } // Ensure this context is only added once if shortcodes are nested. - $has_filter = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' ); + $has_filter = has_filter( 'wp_get_attachment_image_context', '_filter_do_shortcode_context' ); $filter_added = false; if ( ! $has_filter ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index e33070cac6..7a1299ad0f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56272'; +$wp_version = '6.4-alpha-56273'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.