PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 4.1.16
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v4.1.16
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
← All changes | api/check_status.php +4 -4 4.0.254.1.16 View file →
@@ -6,9 +6,9 @@
6 6 $jsonData = file_get_contents('php://input');
7 7 $data = json_decode($jsonData, true);
8 8
9 9 if ($data === null) {
10 - echo json_encode(['status' => 'error', 'msg' => 'Invalid request body']);
10 + echo wp_json_encode(['status' => 'error', 'msg' => 'Invalid request body']);
11 11 exit;
12 12 }
13 13
14 14 $license_key = berqwp_get_license_key();
@@ -14,19 +14,19 @@
14 14 $license_key = berqwp_get_license_key();
15 15 $license_key_hash = sanitize_text_field($data['license_key_hash'] ?? '');
16 16
17 17 if (empty($license_key)) {
18 - echo json_encode(['status' => 'inactive']);
18 + echo wp_json_encode(['status' => 'inactive']);
19 19 exit;
20 20 }
21 21
22 22 if (empty($license_key_hash) || $license_key_hash !== md5($license_key)) {
23 - echo json_encode(['status' => 'error', 'msg' => 'Request authentication failed']);
23 + echo wp_json_encode(['status' => 'error', 'msg' => 'Request authentication failed']);
24 24 http_response_code(403);
25 25 exit;
26 26 }
27 27
28 - echo json_encode([
28 + echo wp_json_encode([
29 29 'status' => 'active',
30 30 'version' => BERQWP_VERSION,
31 31 'site_url' => home_url(),
32 32 ]);