From f0af926dd61b9ee6f308328bede4f2d9ca1dd034 Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Sat, 5 Nov 2022 22:03:16 +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.
Built from https://develop.svn.wordpress.org/trunk@54754
git-svn-id: http://core.svn.wordpress.org/trunk@54306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-includes/block-template-utils.php | 16 ++++++++++------
wp-includes/class-wp-oembed.php | 2 +-
wp-includes/functions.php | 10 +++++++---
.../endpoints/class-wp-rest-posts-controller.php | 6 +++---
wp-includes/script-loader.php | 3 ++-
wp-includes/version.php | 2 +-
6 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php
index 3cdcb19ceb..d2795612ed 100644
--- a/wp-includes/block-template-utils.php
+++ b/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/wp-includes/class-wp-oembed.php b/wp-includes/class-wp-oembed.php
index 3fce5bdb2a..8b24cf752b 100644
--- a/wp-includes/class-wp-oembed.php
+++ b/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/wp-includes/functions.php b/wp-includes/functions.php
index 65b0cb03b7..8e14894f8b 100644
--- a/wp-includes/functions.php
+++ b/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/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index deb83c2f03..571a2fd5f4 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
+++ b/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/wp-includes/script-loader.php b/wp-includes/script-loader.php
index fd1bf4b6fa..f22928dba1 100644
--- a/wp-includes/script-loader.php
+++ b/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,
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 26a613f3e6..070b601d87 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.2-alpha-54751';
+$wp_version = '6.2-alpha-54754';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.