Make WordPress Core


Ignore:
Timestamp:
06/26/2020 12:44:44 AM (4 years ago)
Author:
TimothyBlynJacobs
Message:

REST API: Introduce Block Types endpoint.

This endpoint allows a user to retrieve the block type definition for all server-side registered block types.

Props spacedmonkey, aduth, gziolo, ocean90, TimothyBlynJacobs.
Fixes #47620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r48171 r48173  
    272272    // Block Renderer.
    273273    $controller = new WP_REST_Block_Renderer_Controller;
     274    $controller->register_routes();
     275
     276    // Block Types.
     277    $controller = new WP_REST_Block_Types_Controller();
    274278    $controller->register_routes();
    275279
Note: See TracChangeset for help on using the changeset viewer.