PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 2.0.1
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v2.0.1
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
content-control / classes / Controllers / RestAPI.php

RestAPI.php in Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More 2.0.1, at classes/Controllers/RestAPI.php

36 lines 785 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * RestAPI blocks setup.
4 *
5 * @copyright (c) 2021, Code Atlantic LLC.
6 * @package ContentControl
7 */
8
9 namespace ContentControl\Controllers;
10
11 defined( 'ABSPATH' ) || exit;
12
13 use ContentControl\Base\Controller;
14
15 /**
16 * RestAPI function initialization.
17 */
18 class RestAPI extends Controller {
19 /**
20 * Initiate rest api integrations.
21 */
22 public function init() {
23 add_action( 'rest_api_init', [ $this, 'register_routes' ] );
24 }
25
26 /**
27 * Register Rest API routes.
28 */
29 public function register_routes() {
30 ( new \ContentControl\RestAPI\BlockTypes() )->register_routes();
31 ( new \ContentControl\RestAPI\License() )->register_routes();
32 ( new \ContentControl\RestAPI\ObjectSearch() )->register_routes();
33 ( new \ContentControl\RestAPI\Settings() )->register_routes();
34 }
35 }
36