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/store_cache_webhook.php +5 -5 4.0.214.1.16 View file →
@@ -43,9 +43,9 @@
43 43
44 44 if ($status == 'success' && !empty($html_url)) {
45 45
46 46 if (!bwp_can_optimize_page_url($page_url)) {
47 - echo json_encode(['status' => 'error', 'msg' => 'Invalid page url.']);
47 + echo wp_json_encode(['status' => 'error', 'msg' => 'Invalid page url.']);
48 48 exit;
49 49 }
50 50
51 51 // Download the HTML
@@ -54,9 +54,9 @@
54 54
55 55 // Check for errors
56 56 if (is_wp_error($response) || $response_code !== 200) {
57 57 $berq_log->info("Failed to download cache: $page_url");
58 - echo json_encode(['status' => 'error', 'msg' => 'Could not download html cache']);
58 + echo wp_json_encode(['status' => 'error', 'msg' => 'Could not download html cache']);
59 59 exit;
60 60 }
61 61
62 62 $html = wp_remote_retrieve_body($response);
@@ -64,9 +64,9 @@
64 64 // Allow other plugins to modify cache html
65 65 $html = apply_filters('berqwp_cache_buffer', $html);
66 66
67 67 if (empty($license_key_hash) || empty($license_key) || $license_key_hash !== md5($license_key)) {
68 - echo json_encode(['status' => 'error', 'msg' => 'Request authentication failed']);
68 + echo wp_json_encode(['status' => 'error', 'msg' => 'Request authentication failed']);
69 69 http_response_code(403);
70 70 exit;
71 71 }
72 72
@@ -71,9 +71,9 @@
71 71 }
72 72
73 73 if (empty($html)) {
74 74 $berq_log->info("Empty html cache: $page_url");
75 - echo json_encode(['status' => 'error', 'msg' => 'Empty html cache']);
75 + echo wp_json_encode(['status' => 'error', 'msg' => 'Empty html cache']);
76 76 exit;
77 77 }
78 78
79 79 $cache = new Cache(null, bwp_get_cache_dir());
@@ -89,8 +89,8 @@
89 89 if ($check_connection['status'] == 'error') {
90 90 delete_transient('berqwp_connection_status');
91 91 }
92 92
93 - echo json_encode(['status' => 'success']);
93 + echo wp_json_encode(['status' => 'success']);
94 94 exit;
95 95 }
96 96 }