Make WordPress Core


Ignore:
Timestamp:
10/23/2018 07:03:47 AM (6 years ago)
Author:
pento
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.

Props desrosj, danielbachhuber, pento.
See #45065.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/post.php

    r43804 r43805  
    239239            'show_in_menu'          => false,
    240240            'rewrite'               => false,
     241            'show_in_rest'          => true,
     242            'rest_base'             => 'blocks',
     243            'rest_controller_class' => 'WP_REST_Blocks_Controller',
    241244            'capability_type'       => 'block',
    242245            'capabilities' => array(
Note: See TracChangeset for help on using the changeset viewer.