From 7023be21f57822de1908defe9cb00295e2012198 Mon Sep 17 00:00:00 2001 From: TimothyBlynJacobs Date: Sun, 3 May 2020 22:58:05 +0000 Subject: [PATCH] REST API: Accept POST requests in the block renderer endpoint. Rendering a block is idempotent, so a GET is the most natural request method. However, the maximum length of URLs prevented blocks with large attributes from being rendered. Props ryankienstra. Fixes #49680. Built from https://develop.svn.wordpress.org/trunk@47756 git-svn-id: http://core.svn.wordpress.org/trunk@47532 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../endpoints/class-wp-rest-block-renderer-controller.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php index 94d349a1ba..3bdcae5435 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php @@ -52,7 +52,7 @@ class WP_REST_Block_Renderer_Controller extends WP_REST_Controller { ), ), array( - 'methods' => WP_REST_Server::READABLE, + 'methods' => array( WP_REST_Server::READABLE, WP_REST_Server::CREATABLE ), 'callback' => array( $this, 'get_item' ), 'permission_callback' => array( $this, 'get_item_permissions_check' ), 'args' => array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 85abb2d145..dcd89a0540 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47755'; +$wp_version = '5.5-alpha-47756'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.