# searchpro/4.1.13/inc/thirdparty/plugin/AdminSiteEnhancements.php

BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS &amp; JavaScript, version 4.1.13. 31 lines.

- Page: https://pluginprobe.com/plugins/searchpro/4.1.13/code/inc/thirdparty/plugin/AdminSiteEnhancements.php
- Raw: https://pluginprobe.com/plugins/searchpro/4.1.13/raw/inc/thirdparty/plugin/AdminSiteEnhancements.php
- Modified: 2024-10-02T13:58:02+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/searchpro/4.1.13/code/inc/thirdparty/plugin/AdminSiteEnhancements.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) exit;

class AdminSiteEnhancements extends berqIntegrations
{
    function __construct()
    {
        // BerqWP now uses a webhook to store cache
        // add_action('admin_notices', [$this, 'restapi_error']);
    }

    function restapi_error()
    {
        if (!defined('ASENHA_SLUG_U')) {
            return;
        }

        $options = get_option(ASENHA_SLUG_U, []);

        if (array_key_exists('disable_rest_api', $options) && $options['disable_rest_api']) {
            ?>
            <div class="notice notice-error">
                <p><strong>Error:</strong> The WordPress REST API is disabled. BerqWP plugin will not function correctly without the
                    REST API. Please enable the REST API for full functionality.</p>
            </div>
            <?php
        }
    }
}

new AdminSiteEnhancements();
```
