Make WordPress Core


Ignore:
Timestamp:
05/03/2020 10:56:01 PM (5 years ago)
Author:
TimothyBlynJacobs
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php

    r47391 r47756  
    5353                    ),
    5454                    array(
    55                         'methods'             => WP_REST_Server::READABLE,
     55                        'methods'             => array( WP_REST_Server::READABLE, WP_REST_Server::CREATABLE ),
    5656                        'callback'            => array( $this, 'get_item' ),
    5757                        'permission_callback' => array( $this, 'get_item_permissions_check' ),
Note: See TracChangeset for help on using the changeset viewer.