Skip to content

Commit

Permalink
Coding Standards: Correct equals sign alignment in various files.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov committed Jul 20, 2023
1 parent 0c97999 commit cb42d72
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/wp-admin/includes/class-wp-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,11 +846,12 @@ public static function 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 ),
);
Expand Down
6 changes: 3 additions & 3 deletions src/wp-admin/includes/class-wp-ms-sites-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,15 @@ public function get_columns() {
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' ),
);
Expand Down
7 changes: 6 additions & 1 deletion src/wp-admin/includes/class-wp-posts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,12 @@ protected function get_sortable_columns() {
$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 ),
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ private function filter_eligible_strategies( $handle, $eligible = null, $checked
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.
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit cb42d72

Please sign in to comment.