From 747bf65f4b8c25d97abd29134ddb5a61a3e1a59f Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Sat, 5 Nov 2022 22:01:47 +0000
Subject: [PATCH] Coding Standards: Correct alignment in various files.
This fixes `Equals sign not aligned with surrounding statements` WPCS warnings, so that the output of `composer format` is clean.
Follow-up to [54445], [54476], [54494], [54522], [54652], [54687].
See #56791.
git-svn-id: https://develop.svn.wordpress.org/trunk@54754 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-includes/block-template-utils.php | 16 ++++++++++------
src/wp-includes/class-wp-oembed.php | 2 +-
src/wp-includes/functions.php | 10 +++++++---
.../endpoints/class-wp-rest-posts-controller.php | 6 +++---
src/wp-includes/script-loader.php | 3 ++-
5 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php
index 3cdcb19ceb..d2795612ed 100644
--- a/src/wp-includes/block-template-utils.php
+++ b/src/wp-includes/block-template-utils.php
@@ -556,10 +556,11 @@ function _wp_build_title_and_description_for_single_post_type_block_template( $p
'no_found_rows' => true,
);
- $args = array(
+ $args = array(
'name' => $slug,
);
- $args = wp_parse_args( $args, $default_args );
+ $args = wp_parse_args( $args, $default_args );
+
$posts_query = new WP_Query( $args );
if ( empty( $posts_query->posts ) ) {
@@ -591,7 +592,8 @@ function _wp_build_title_and_description_for_single_post_type_block_template( $p
$args = array(
'title' => $post_title,
);
- $args = wp_parse_args( $args, $default_args );
+ $args = wp_parse_args( $args, $default_args );
+
$posts_with_same_title_query = new WP_Query( $args );
if ( count( $posts_with_same_title_query->posts ) > 1 ) {
@@ -630,11 +632,12 @@ function _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy,
$term_query = new WP_Term_Query();
- $args = array(
+ $args = array(
'number' => 1,
'slug' => $slug,
);
- $args = wp_parse_args( $args, $default_args );
+ $args = wp_parse_args( $args, $default_args );
+
$terms_query = $term_query->query( $args );
if ( empty( $terms_query ) ) {
@@ -668,7 +671,8 @@ function _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy,
'number' => 2,
'name' => $term_title,
);
- $args = wp_parse_args( $args, $default_args );
+ $args = wp_parse_args( $args, $default_args );
+
$terms_with_same_title_query = $term_query->query( $args );
if ( count( $terms_with_same_title_query ) > 1 ) {
diff --git a/src/wp-includes/class-wp-oembed.php b/src/wp-includes/class-wp-oembed.php
index 3fce5bdb2a..8b24cf752b 100644
--- a/src/wp-includes/class-wp-oembed.php
+++ b/src/wp-includes/class-wp-oembed.php
@@ -80,7 +80,7 @@ class WP_oEmbed {
'#https?://(www\.)?mixcloud\.com/.*#i' => array( 'https://www.mixcloud.com/oembed', true ),
'#https?://(www\.|embed\.)?ted\.com/talks/.*#i' => array( 'https://www.ted.com/services/v1/oembed.{format}', true ),
'#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'https://animoto.com/oembeds/create', true ),
- '#https?://(.+)\.tumblr\.com/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ),
+ '#https?://(.+)\.tumblr\.com/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ),
'#https?://(www\.)?kickstarter\.com/projects/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
'#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
'#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ),
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 65b0cb03b7..8e14894f8b 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -3567,19 +3567,23 @@ function wp_nonce_ays( $action ) {
__( 'You are attempting to log out of %s' ),
get_bloginfo( 'name' )
);
- $html = $title;
- $html .= '
';
+
$redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
- $html .= sprintf(
+
+ $html = $title;
+ $html .= '
';
+ $html .= sprintf(
/* translators: %s: Logout URL. */
__( 'Do you really want to log out?' ),
wp_logout_url( $redirect_to )
);
} else {
$html = __( 'The link you followed has expired.' );
+
if ( wp_get_referer() ) {
$wp_http_referer = remove_query_arg( 'updated', wp_get_referer() );
$wp_http_referer = wp_validate_redirect( esc_url_raw( $wp_http_referer ) );
+
$html .= '
';
$html .= sprintf(
'%s',
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index deb83c2f03..571a2fd5f4 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
@@ -2890,9 +2890,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
}
$query_params['slug'] = array(
- 'description' => __( 'Limit result set to posts with one or more specific slugs.' ),
- 'type' => 'array',
- 'items' => array(
+ 'description' => __( 'Limit result set to posts with one or more specific slugs.' ),
+ 'type' => 'array',
+ 'items' => array(
'type' => 'string',
),
);
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index fd1bf4b6fa..f22928dba1 100644
--- a/src/wp-includes/script-loader.php
+++ b/src/wp-includes/script-loader.php
@@ -3686,7 +3686,8 @@ function wp_add_editor_classic_theme_styles( $editor_settings ) {
if ( WP_Theme_JSON_Resolver::theme_has_support() ) {
return $editor_settings;
}
- $suffix = wp_scripts_get_suffix();
+
+ $suffix = wp_scripts_get_suffix();
$classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css";
// This follows the pattern of get_block_editor_theme_styles,