| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) exit; |
| 3 |
|
| 4 |
class AdminSiteEnhancements extends berqIntegrations |
| 5 |
{ |
| 6 |
function __construct() |
| 7 |
{ |
| 8 |
// BerqWP now uses a webhook to store cache |
| 9 |
// add_action('admin_notices', [$this, 'restapi_error']); |
| 10 |
} |
| 11 |
|
| 12 |
function restapi_error() |
| 13 |
{ |
| 14 |
if (!defined('ASENHA_SLUG_U')) { |
| 15 |
return; |
| 16 |
} |
| 17 |
|
| 18 |
$options = get_option(ASENHA_SLUG_U, []); |
| 19 |
|
| 20 |
if (array_key_exists('disable_rest_api', $options) && $options['disable_rest_api']) { |
| 21 |
?> |
| 22 |
<div class="notice notice-error"> |
| 23 |
<p><strong>Error:</strong> The WordPress REST API is disabled. BerqWP plugin will not function correctly without the |
| 24 |
REST API. Please enable the REST API for full functionality.</p> |
| 25 |
</div> |
| 26 |
<?php |
| 27 |
} |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
new AdminSiteEnhancements(); |