mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
REST API: Bring new endpoints for Block Patterns from Gutenberg plugin
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/39889. Backporting changes from the Gutenberg plugin: - new Block Patterns REST API endpoint - new Block Pattern Categories REST API endpoint - updates to Query Loop related patterns - support for custom taxonomies in Query Loop block Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53152 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -337,6 +337,14 @@ function create_initial_rest_routes() {
|
||||
$controller = new WP_REST_Pattern_Directory_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Block Patterns.
|
||||
$controller = new WP_REST_Block_Patterns_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Block Pattern Categories.
|
||||
$controller = new WP_REST_Block_Pattern_Categories_Controller();
|
||||
$controller->register_routes();
|
||||
|
||||
// Site Health.
|
||||
$site_health = WP_Site_Health::get_instance();
|
||||
$controller = new WP_REST_Site_Health_Controller( $site_health );
|
||||
|
||||
Reference in New Issue
Block a user