WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/23/2018 07:03:47 AM (3 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/tests/phpunit/tests/rest-api/rest-schema-setup.php

    r43768 r43805  
    100100            '/wp/v2/media',
    101101            '/wp/v2/media/(?P<id>[\\d]+)',
     102            '/wp/v2/blocks',
     103            '/wp/v2/blocks/(?P<id>[\d]+)',
     104            '/wp/v2/blocks/(?P<parent>[\d]+)/autosaves',
     105            '/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)',
    102106            '/wp/v2/types',
    103107            '/wp/v2/types/(?P<type>[\\w-]+)',
     
    116120            '/wp/v2/comments/(?P<id>[\\d]+)',
    117121            '/wp/v2/search',
     122            '/wp/v2/block-renderer/(?P<name>core/block)',
     123            '/wp/v2/block-renderer/(?P<name>core/latest-comments)',
     124            '/wp/v2/block-renderer/(?P<name>core/archives)',
     125            '/wp/v2/block-renderer/(?P<name>core/categories)',
     126            '/wp/v2/block-renderer/(?P<name>core/latest-posts)',
     127            '/wp/v2/block-renderer/(?P<name>core/shortcode)',
    118128            '/wp/v2/settings',
    119129            '/wp/v2/themes',
Note: See TracChangeset for help on using the changeset viewer.