Make WordPress Core


Ignore:
Timestamp:
12/14/2018 02:34:28 AM (6 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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/rest-api.php

    r44126 r44150  
    250250    $controller->register_routes();
    251251
     252    // Block Renderer.
     253    $controller = new WP_REST_Block_Renderer_Controller;
     254    $controller->register_routes();
     255
    252256    // Settings.
    253257    $controller = new WP_REST_Settings_Controller;
     
    257261    $controller = new WP_REST_Themes_Controller;
    258262    $controller->register_routes();
     263
    259264}
    260265
Note: See TracChangeset for help on using the changeset viewer.