Skip to content

Commit 7500889

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 [56796], [56803], [56838], [56839], [56985]. See #59650. git-svn-id: https://develop.svn.wordpress.org/trunk@57053 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2e6a235 commit 7500889

5 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/wp-includes/blocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ function get_comments_pagination_arrow( $block, $pagination_type = 'next' ) {
19701970
* @return string Filtered content without any HTML on the footnote content and with the sanitized id.
19711971
*/
19721972
function _wp_filter_post_meta_footnotes( $footnotes ) {
1973-
$footnotes_decoded = json_decode( $footnotes, true );
1973+
$footnotes_decoded = json_decode( $footnotes, true );
19741974
if ( ! is_array( $footnotes_decoded ) ) {
19751975
return '';
19761976
}

src/wp-includes/class-wp-block-list.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ public function offsetGet( $offset ) {
9393
$block = $this->blocks[ $offset ];
9494

9595
if ( isset( $block ) && is_array( $block ) ) {
96-
$block = new WP_Block( $block, $this->available_context, $this->registry );
96+
$block = new WP_Block( $block, $this->available_context, $this->registry );
97+
9798
$this->blocks[ $offset ] = $block;
9899
}
99100

src/wp-includes/media.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,7 +2608,7 @@ function gallery_shortcode( $attr ) {
26082608
}
26092609
} elseif ( ! empty( $atts['exclude'] ) ) {
26102610
$post_parent_id = $id;
2611-
$attachments = get_children(
2611+
$attachments = get_children(
26122612
array(
26132613
'post_parent' => $id,
26142614
'exclude' => $atts['exclude'],
@@ -2621,7 +2621,7 @@ function gallery_shortcode( $attr ) {
26212621
);
26222622
} else {
26232623
$post_parent_id = $id;
2624-
$attachments = get_children(
2624+
$attachments = get_children(
26252625
array(
26262626
'post_parent' => $id,
26272627
'post_status' => 'inherit',

src/wp-includes/option.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,13 @@ function wp_set_option_autoload_values( array $options ) {
475475
wp_cache_delete( 'alloptions', 'options' );
476476
} elseif ( $grouped_options['no'] ) {
477477
$alloptions = wp_load_alloptions( true );
478+
478479
foreach ( $grouped_options['no'] as $option ) {
479480
if ( isset( $alloptions[ $option ] ) ) {
480481
unset( $alloptions[ $option ] );
481482
}
482483
}
484+
483485
wp_cache_set( 'alloptions', $alloptions, 'options' );
484486
}
485487

@@ -843,6 +845,7 @@ function update_option( $option, $value, $autoload = null ) {
843845
if ( ! isset( $update_args['autoload'] ) ) {
844846
// Update the cached value based on where it is currently cached.
845847
$alloptions = wp_load_alloptions( true );
848+
846849
if ( isset( $alloptions[ $option ] ) ) {
847850
$alloptions[ $option ] = $serialized_value;
848851
wp_cache_set( 'alloptions', $alloptions, 'options' );
@@ -854,11 +857,13 @@ function update_option( $option, $value, $autoload = null ) {
854857
wp_cache_delete( $option, 'options' );
855858

856859
$alloptions = wp_load_alloptions( true );
860+
857861
$alloptions[ $option ] = $serialized_value;
858862
wp_cache_set( 'alloptions', $alloptions, 'options' );
859863
} else {
860864
// Delete the alloptions cache, then set the individual cache.
861865
$alloptions = wp_load_alloptions( true );
866+
862867
if ( isset( $alloptions[ $option ] ) ) {
863868
unset( $alloptions[ $option ] );
864869
wp_cache_set( 'alloptions', $alloptions, 'options' );
@@ -1089,6 +1094,7 @@ function delete_option( $option ) {
10891094
if ( ! wp_installing() ) {
10901095
if ( 'yes' === $row->autoload ) {
10911096
$alloptions = wp_load_alloptions( true );
1097+
10921098
if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) {
10931099
unset( $alloptions[ $option ] );
10941100
wp_cache_set( 'alloptions', $alloptions, 'options' );
@@ -1216,6 +1222,7 @@ function get_transient( $transient ) {
12161222
if ( ! wp_installing() ) {
12171223
// If option is not in alloptions, it is not autoloaded and thus has a timeout.
12181224
$alloptions = wp_load_alloptions();
1225+
12191226
if ( ! isset( $alloptions[ $transient_option ] ) ) {
12201227
$transient_timeout = '_transient_timeout_' . $transient;
12211228
$timeout = get_option( $transient_timeout );

src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public function get_url_list( $page_num, $object_subtype = '' ) {
131131

132132
if ( ! empty( $latest_posts->posts ) ) {
133133
$posts = wp_list_sort( $latest_posts->posts, 'post_modified_gmt', 'DESC' );
134+
134135
$sitemap_entry['lastmod'] = wp_date( DATE_W3C, strtotime( $posts[0]->post_modified_gmt ) );
135136
}
136137

0 commit comments

Comments
 (0)