From 7c8bed0be227ed585ff17d8092acd5b37679d41a Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 7 Dec 2021 22:48:54 +0000 Subject: [PATCH] Coding Standards: Correct alignment in `blocks.php` and `class-wp-rest-templates-controller`. See #53359. git-svn-id: https://develop.svn.wordpress.org/trunk@52345 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 6 +++--- .../endpoints/class-wp-rest-templates-controller.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index ff087d0b82..a649bfe457 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -103,9 +103,9 @@ function register_block_script_handle( $metadata, $field_name ) { return false; } // Path needs to be normalized to work in Windows env. - $wpinc_path_norm = wp_normalize_path( ABSPATH . WPINC ); - $script_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $script_path ) ); - $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm ); + $wpinc_path_norm = wp_normalize_path( ABSPATH . WPINC ); + $script_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $script_path ) ); + $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm ); $script_uri = $is_core_block ? includes_url( str_replace( $wpinc_path_norm, '', $script_path_norm ) ) : diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php index 75411b107f..02bfe5ce24 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php @@ -342,7 +342,7 @@ class WP_REST_Templates_Controller extends WP_REST_Controller { * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function create_item( $request ) { - $prepared_post = $this->prepare_item_for_database( $request ); + $prepared_post = $this->prepare_item_for_database( $request ); if ( is_wp_error( $prepared_post ) ) { return $prepared_post; @@ -857,7 +857,7 @@ class WP_REST_Templates_Controller extends WP_REST_Controller { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'author' => array( + 'author' => array( 'description' => __( 'The ID for the author of the template.' ), 'type' => 'integer', 'context' => array( 'view', 'edit', 'embed' ),