Make WordPress Core


Ignore:
Timestamp:
12/14/2018 02:34:28 AM (8 years ago)
Author:
jeremyfelt
Message:

REST API: Add endpoints for blocks.

WP_REST_Block_Renderer_Controller allows rendering of server-side rendered blocks, whilst WP_REST_Blocks_Controller allows retrieving of reusable blocks.

Merges [43805] and [43806] from the 5.0 branch to trunk.

Props desrosj, danielbachhuber, pento, Presskopp, swissspidy.
See #45065, #45098.

Location:
trunk
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

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

    r43805 r44150  
    9494                                return new WP_Error(
    9595                                        'block_cannot_read',
    96                                         __( 'Sorry, you are not allowed to read blocks of this post' ),
     96                                        __( 'Sorry, you are not allowed to read blocks of this post.' ),
    9797                                        array(
    9898                                                'status' => rest_authorization_required_code(),
Note: See TracChangeset for help on using the changeset viewer.