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/branches/6.1@54752


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-11-05 17:30:17 +00:00
parent 77dd4175a7
commit d6ec0b0ae2
6 changed files with 24 additions and 15 deletions

View File

@ -556,10 +556,11 @@ function _wp_build_title_and_description_for_single_post_type_block_template( $p
'no_found_rows' => true, 'no_found_rows' => true,
); );
$args = array( $args = array(
'name' => $slug, 'name' => $slug,
); );
$args = wp_parse_args( $args, $default_args ); $args = wp_parse_args( $args, $default_args );
$posts_query = new WP_Query( $args ); $posts_query = new WP_Query( $args );
if ( empty( $posts_query->posts ) ) { if ( empty( $posts_query->posts ) ) {
@ -591,7 +592,8 @@ function _wp_build_title_and_description_for_single_post_type_block_template( $p
$args = array( $args = array(
'title' => $post_title, '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 ); $posts_with_same_title_query = new WP_Query( $args );
if ( count( $posts_with_same_title_query->posts ) > 1 ) { 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(); $term_query = new WP_Term_Query();
$args = array( $args = array(
'number' => 1, 'number' => 1,
'slug' => $slug, 'slug' => $slug,
); );
$args = wp_parse_args( $args, $default_args ); $args = wp_parse_args( $args, $default_args );
$terms_query = $term_query->query( $args ); $terms_query = $term_query->query( $args );
if ( empty( $terms_query->terms ) ) { if ( empty( $terms_query->terms ) ) {
@ -668,7 +671,8 @@ function _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy,
'number' => 2, 'number' => 2,
'name' => $term_title, '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 ); $terms_with_same_title_query = $term_query->query( $args );
if ( count( $terms_with_same_title_query->terms ) > 1 ) { if ( count( $terms_with_same_title_query->terms ) > 1 ) {

View File

@ -80,7 +80,7 @@ class WP_oEmbed {
'#https?://(www\.)?mixcloud\.com/.*#i' => array( 'https://www.mixcloud.com/oembed', true ), '#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\.|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?://(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?://(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?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
'#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ), '#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ),

View File

@ -3567,19 +3567,23 @@ function wp_nonce_ays( $action ) {
__( 'You are attempting to log out of %s' ), __( 'You are attempting to log out of %s' ),
get_bloginfo( 'name' ) get_bloginfo( 'name' )
); );
$html = $title;
$html .= '</p><p>';
$redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
$html .= sprintf(
$html = $title;
$html .= '</p><p>';
$html .= sprintf(
/* translators: %s: Logout URL. */ /* translators: %s: Logout URL. */
__( 'Do you really want to <a href="%s">log out</a>?' ), __( 'Do you really want to <a href="%s">log out</a>?' ),
wp_logout_url( $redirect_to ) wp_logout_url( $redirect_to )
); );
} else { } else {
$html = __( 'The link you followed has expired.' ); $html = __( 'The link you followed has expired.' );
if ( wp_get_referer() ) { if ( wp_get_referer() ) {
$wp_http_referer = remove_query_arg( 'updated', 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 ) ); $wp_http_referer = wp_validate_redirect( esc_url_raw( $wp_http_referer ) );
$html .= '</p><p>'; $html .= '</p><p>';
$html .= sprintf( $html .= sprintf(
'<a href="%s">%s</a>', '<a href="%s">%s</a>',

View File

@ -2890,9 +2890,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
} }
$query_params['slug'] = array( $query_params['slug'] = array(
'description' => __( 'Limit result set to posts with one or more specific slugs.' ), 'description' => __( 'Limit result set to posts with one or more specific slugs.' ),
'type' => 'array', 'type' => 'array',
'items' => array( 'items' => array(
'type' => 'string', 'type' => 'string',
), ),
); );

View File

@ -3686,7 +3686,8 @@ function wp_add_editor_classic_theme_styles( $editor_settings ) {
if ( WP_Theme_JSON_Resolver::theme_has_support() ) { if ( WP_Theme_JSON_Resolver::theme_has_support() ) {
return $editor_settings; return $editor_settings;
} }
$suffix = wp_scripts_get_suffix();
$suffix = wp_scripts_get_suffix();
$classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css"; $classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css";
// This follows the pattern of get_block_editor_theme_styles, // This follows the pattern of get_block_editor_theme_styles,

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.1.1-alpha-54746'; $wp_version = '6.1.1-alpha-54752';
/** /**
* 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.