HEX
Server: LiteSpeed
System: Linux premium212.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: vitanhod (1367)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/vitanhod/www/wp-content/plugins/system-control/api/endpoints/class-sc-sync-endpoint.php
<?php
class SC_Sync_Endpoint {
    public function register() {
        register_rest_route(SC_REST_NAMESPACE, '/sync', [
            'methods'             => 'GET',
            'callback'            => [$this, 'get_sync_data'],
            'permission_callback' => ['SC_Api_Auth', 'verify'],
        ]);
    }

    public function get_sync_data($request) {
        $data = SC_Activator::gather_site_info();
        $data['is_active'] = (bool)get_option('sc_is_active', 1);
        $data['plugin_install_blocked'] = (bool)get_option('sc_plugin_install_blocked', false);
        return rest_ensure_response($data);
    }
}