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.
Built from https://develop.svn.wordpress.org/trunk@57053


git-svn-id: http://core.svn.wordpress.org/trunk@56564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-11-02 00:04:24 +00:00
parent 6c91e1adfa
commit b330629c53
6 changed files with 14 additions and 5 deletions

View File

@ -94,6 +94,7 @@ class WP_Block_List implements Iterator, ArrayAccess, Countable {
if ( isset( $block ) && is_array( $block ) ) { if ( isset( $block ) && is_array( $block ) ) {
$block = new WP_Block( $block, $this->available_context, $this->registry ); $block = new WP_Block( $block, $this->available_context, $this->registry );
$this->blocks[ $offset ] = $block; $this->blocks[ $offset ] = $block;
} }

View File

@ -475,11 +475,13 @@ function wp_set_option_autoload_values( array $options ) {
wp_cache_delete( 'alloptions', 'options' ); wp_cache_delete( 'alloptions', 'options' );
} elseif ( $grouped_options['no'] ) { } elseif ( $grouped_options['no'] ) {
$alloptions = wp_load_alloptions( true ); $alloptions = wp_load_alloptions( true );
foreach ( $grouped_options['no'] as $option ) { foreach ( $grouped_options['no'] as $option ) {
if ( isset( $alloptions[ $option ] ) ) { if ( isset( $alloptions[ $option ] ) ) {
unset( $alloptions[ $option ] ); unset( $alloptions[ $option ] );
} }
} }
wp_cache_set( 'alloptions', $alloptions, 'options' ); wp_cache_set( 'alloptions', $alloptions, 'options' );
} }
@ -843,6 +845,7 @@ function update_option( $option, $value, $autoload = null ) {
if ( ! isset( $update_args['autoload'] ) ) { if ( ! isset( $update_args['autoload'] ) ) {
// Update the cached value based on where it is currently cached. // Update the cached value based on where it is currently cached.
$alloptions = wp_load_alloptions( true ); $alloptions = wp_load_alloptions( true );
if ( isset( $alloptions[ $option ] ) ) { if ( isset( $alloptions[ $option ] ) ) {
$alloptions[ $option ] = $serialized_value; $alloptions[ $option ] = $serialized_value;
wp_cache_set( 'alloptions', $alloptions, 'options' ); wp_cache_set( 'alloptions', $alloptions, 'options' );
@ -854,11 +857,13 @@ function update_option( $option, $value, $autoload = null ) {
wp_cache_delete( $option, 'options' ); wp_cache_delete( $option, 'options' );
$alloptions = wp_load_alloptions( true ); $alloptions = wp_load_alloptions( true );
$alloptions[ $option ] = $serialized_value; $alloptions[ $option ] = $serialized_value;
wp_cache_set( 'alloptions', $alloptions, 'options' ); wp_cache_set( 'alloptions', $alloptions, 'options' );
} else { } else {
// Delete the alloptions cache, then set the individual cache. // Delete the alloptions cache, then set the individual cache.
$alloptions = wp_load_alloptions( true ); $alloptions = wp_load_alloptions( true );
if ( isset( $alloptions[ $option ] ) ) { if ( isset( $alloptions[ $option ] ) ) {
unset( $alloptions[ $option ] ); unset( $alloptions[ $option ] );
wp_cache_set( 'alloptions', $alloptions, 'options' ); wp_cache_set( 'alloptions', $alloptions, 'options' );
@ -1089,6 +1094,7 @@ function delete_option( $option ) {
if ( ! wp_installing() ) { if ( ! wp_installing() ) {
if ( 'yes' === $row->autoload ) { if ( 'yes' === $row->autoload ) {
$alloptions = wp_load_alloptions( true ); $alloptions = wp_load_alloptions( true );
if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) { if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) {
unset( $alloptions[ $option ] ); unset( $alloptions[ $option ] );
wp_cache_set( 'alloptions', $alloptions, 'options' ); wp_cache_set( 'alloptions', $alloptions, 'options' );
@ -1216,6 +1222,7 @@ function get_transient( $transient ) {
if ( ! wp_installing() ) { if ( ! wp_installing() ) {
// If option is not in alloptions, it is not autoloaded and thus has a timeout. // If option is not in alloptions, it is not autoloaded and thus has a timeout.
$alloptions = wp_load_alloptions(); $alloptions = wp_load_alloptions();
if ( ! isset( $alloptions[ $transient_option ] ) ) { if ( ! isset( $alloptions[ $transient_option ] ) ) {
$transient_timeout = '_transient_timeout_' . $transient; $transient_timeout = '_transient_timeout_' . $transient;
$timeout = get_option( $transient_timeout ); $timeout = get_option( $transient_timeout );

View File

@ -131,6 +131,7 @@ class WP_Sitemaps_Posts extends WP_Sitemaps_Provider {
if ( ! empty( $latest_posts->posts ) ) { if ( ! empty( $latest_posts->posts ) ) {
$posts = wp_list_sort( $latest_posts->posts, 'post_modified_gmt', 'DESC' ); $posts = wp_list_sort( $latest_posts->posts, 'post_modified_gmt', 'DESC' );
$sitemap_entry['lastmod'] = wp_date( DATE_W3C, strtotime( $posts[0]->post_modified_gmt ) ); $sitemap_entry['lastmod'] = wp_date( DATE_W3C, strtotime( $posts[0]->post_modified_gmt ) );
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.5-alpha-57052'; $wp_version = '6.5-alpha-57053';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.