# force-refresh/2.10.2/includes/api/register-endpoints.php

Force Refresh, version 2.10.2. 37 lines.

- Page: https://pluginprobe.com/plugins/force-refresh/2.10.2/code/includes/api/register-endpoints.php
- Raw: https://pluginprobe.com/plugins/force-refresh/2.10.2/raw/includes/api/register-endpoints.php
- Modified: 2024-05-27T19:35:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/force-refresh/2.10.2/code/includes/api/register-endpoints.php#L10-L20`.

```php
<?php
/**
 * Our API calls responsible for handling requests from admins requesting a refresh for the site.
 *
 * @package ForceRefresh
 */

namespace JordanLeven\Plugins\ForceRefresh\Api;

/**
 * Function for instantiating the client API
 * handler and registering endpoints.
 *
 * @return  void
 */
function register_admin_endpoints(): void {
    $controller = new Api_Handler_Admin_Refresh_Site();
    $controller->register_routes();

    $controller = new Api_Handler_Admin_Refresh_Page();
    $controller->register_routes();

    $controller = new Api_Handler_Admin_Options();
    $controller->register_routes();

    $controller = new Api_Handler_Admin_Debugging();
    $controller->register_routes();

    $controller = new Api_Handler_Client();
    $controller->register_routes();

    $controller = new Api_Handler_Admin_Schedule_Refresh_Site();
    $controller->register_routes();
}

add_action( 'rest_api_init', __NAMESPACE__ . '\\register_admin_endpoints' );

```
