PluginProbe
Force Refresh / 2.10.0
Force Refresh v2.10.0
3.2.1 3.2.0 3.1.2 3.1.1 3.1.0 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.11.0 2.11.1 2.12.0 All 54 releases
force-refresh / includes / api / register-endpoints.php

register-endpoints.php in Force Refresh 2.10.0, at includes/api/register-endpoints.php

39 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Our API calls responsible for handling requests from admins requesting a refresh for the site.
4 *
5 * @package ForceRefresh
6 */
7
8 namespace JordanLeven\Plugins\ForceRefresh\Api;
9
10 /**
11 * Function for instantiating the client API
12 * handler and registering endpoints.
13 *
14 * @return void
15 */
16 function register_admin_endpoints(): void {
17 $controller = new Api_Handler_Admin_Refresh_Site();
18 $controller->register_routes();
19
20 $controller = new Api_Handler_Admin_Refresh_Page();
21 $controller->register_routes();
22
23 $controller = new Api_Handler_Admin_Options();
24 $controller->register_routes();
25
26 $controller = new Api_Handler_Admin_Debugging();
27 $controller->register_routes();
28
29 $controller = new Api_Handler_Client();
30 $controller->register_routes();
31
32 $controller = new Api_Handler_Admin_Schedule_Refresh_Site();
33 $controller->register_routes();
34 }
35
36 add_action( 'rest_api_init', __NAMESPACE__ . '\\register_admin_endpoints' );
37 $controller = new Api_Handler_Admin_Schedule_Refresh_Site();
38 $controller->register_actions();
39