PluginProbe
Gutenberg Essential Blocks – Page Builder for Gutenberg Blocks & Patterns / 6.4.1
Gutenberg Essential Blocks – Page Builder for Gutenberg Blocks & Patterns v6.4.1
6.4.3 6.4.2 6.4.1 6.4.0 6.3.0 6.2.1 6.2.0 6.1.4 6.1.3 6.1.2 6.1.1 6.1.0 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 2.0.0 2.0.1 2.0.2 2.1.0 2.2.0 All 198 releases
essential-blocks / includes / API / Server.php

Server.php in Gutenberg Essential Blocks – Page Builder for Gutenberg Blocks & Patterns 6.4.1, at includes/API/Server.php

30 lines 545 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace EssentialBlocks\API;
4
5 use EssentialBlocks\Traits\HasSingletone;
6
7 class Server {
8 use HasSingletone;
9
10 public function __construct() {
11 add_action( 'rest_api_init', array( $this, 'register_routes' ) );
12 }
13
14 public function register_routes() {
15 $routes = $this->routes();
16
17 foreach ( $routes as $route ) {
18 $route->register();
19 }
20 }
21
22 public function routes() {
23 return array(
24 'product' => Product::get_instance(),
25 'post-blocks' => PostBlock::get_instance(),
26 'common' => Common::get_instance(),
27 );
28 }
29 }
30