From e0d13f8b59de2778dec32b4b7e8ff42196b5bf59 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 17 Apr 2022 15:07:08 +0000 Subject: [PATCH] Coding Standards: Correct alignment in various files. This fixes an `Array double arrow not aligned correctly` WPCS warning. Follow-up to [53075], [53084], [53091], [53094], [53155], [53129]. See #54728. Built from https://develop.svn.wordpress.org/trunk@53197 git-svn-id: http://core.svn.wordpress.org/trunk@52786 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 24 +++++++++---------- wp-admin/site-editor.php | 12 +++++----- wp-includes/block-template-utils.php | 4 ++-- wp-includes/blocks.php | 2 +- .../class-wp-rest-block-types-controller.php | 2 +- ...class-wp-rest-global-styles-controller.php | 2 +- wp-includes/version.php | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index c08cde109a..8fdea59a18 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -57,7 +57,7 @@ $preload_paths = array( '/wp/v2/taxonomies?context=view', add_query_arg( array( - 'context' => 'edit', + 'context' => 'edit', 'per_page' => -1, ), rest_get_route_for_post_type_items( 'wp_block' ) @@ -188,25 +188,25 @@ if ( $user_id ) { $body_placeholder = apply_filters( 'write_your_story', __( 'Type / to choose a block' ), $post ); $editor_settings = array( - 'availableTemplates' => $available_templates, - 'disablePostFormats' => ! current_theme_supports( 'post-formats' ), + 'availableTemplates' => $available_templates, + 'disablePostFormats' => ! current_theme_supports( 'post-formats' ), /** This filter is documented in wp-admin/edit-form-advanced.php */ - 'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title' ), $post ), - 'bodyPlaceholder' => $body_placeholder, - 'autosaveInterval' => AUTOSAVE_INTERVAL, - 'richEditingEnabled' => user_can_richedit(), - 'postLock' => $lock_details, - 'postLockUtils' => array( + 'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title' ), $post ), + 'bodyPlaceholder' => $body_placeholder, + 'autosaveInterval' => AUTOSAVE_INTERVAL, + 'richEditingEnabled' => user_can_richedit(), + 'postLock' => $lock_details, + 'postLockUtils' => array( 'nonce' => wp_create_nonce( 'lock-post_' . $post->ID ), 'unlockNonce' => wp_create_nonce( 'update-post_' . $post->ID ), 'ajaxUrl' => admin_url( 'admin-ajax.php' ), ), - 'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(), - 'supportsTemplateMode' => current_theme_supports( 'block-templates' ), + 'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(), + 'supportsTemplateMode' => current_theme_supports( 'block-templates' ), // Whether or not to load the 'postcustom' meta box is stored as a user meta // field so that we're not always loading its assets. - 'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ), + 'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ), ); $autosave = wp_get_post_autosave( $post->ID ); diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php index 09706dafd0..317660909c 100644 --- a/wp-admin/site-editor.php +++ b/wp-admin/site-editor.php @@ -61,12 +61,12 @@ foreach ( get_default_block_template_types() as $slug => $template_type ) { $block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) ); $custom_settings = array( - 'siteUrl' => site_url(), - 'postsPerPage' => get_option( 'posts_per_page' ), - 'styles' => get_block_editor_theme_styles(), - 'defaultTemplateTypes' => $indexed_template_types, - 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), - '__unstableHomeTemplate' => $home_template, + 'siteUrl' => site_url(), + 'postsPerPage' => get_option( 'posts_per_page' ), + 'styles' => get_block_editor_theme_styles(), + 'defaultTemplateTypes' => $indexed_template_types, + 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), + '__unstableHomeTemplate' => $home_template, ); $editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context ); diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index 3e440db351..0cfdccdc6e 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -1001,8 +1001,8 @@ function wp_generate_block_templates_export_file() { if ( $theme_json_raw['version'] ) { global $wp_version; $theme_json_version = 'wp/' . substr( $wp_version, 0, 3 ); - $schema = array( '$schema' => 'https://schemas.wp.org/' . $theme_json_version . '/theme.json' ); - $theme_json_raw = array_merge( $schema, $theme_json_raw ); + $schema = array( '$schema' => 'https://schemas.wp.org/' . $theme_json_version . '/theme.json' ); + $theme_json_raw = array_merge( $schema, $theme_json_raw ); } // Convert to a string. diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index 3be427e866..9d41509cc0 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -1362,7 +1362,7 @@ function _wp_multiple_block_styles( $metadata ) { $style_uri = get_theme_file_uri( str_replace( $theme_path_norm, '', $style_path_norm ) ); } - $args = array( + $args = array( 'handle' => sanitize_key( "{$metadata['name']}-{$style_path}" ), 'src' => $style_uri, ); diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php index 95b12e388a..33409ed188 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php @@ -646,7 +646,7 @@ class WP_REST_Block_Types_Controller extends WP_REST_Controller { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'ancestor' => array( + 'ancestor' => array( 'description' => __( 'Ancestor blocks.' ), 'type' => array( 'array', 'null' ), 'items' => array( diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php index 37def7688e..e1b348b408 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php @@ -581,7 +581,7 @@ class WP_REST_Global_Styles_Controller extends WP_REST_Controller { } if ( rest_is_field_included( 'styles', $fields ) ) { - $raw_data = $theme->get_raw_data(); + $raw_data = $theme->get_raw_data(); $data['styles'] = isset( $raw_data['styles'] ) ? $raw_data['styles'] : array(); } diff --git a/wp-includes/version.php b/wp-includes/version.php index b2b0218be9..f6b591cb04 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta1-53196'; +$wp_version = '6.0-beta1-53197'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.