PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 4.1.18
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v4.1.18
4.1.19 4.1.18 4.1.17 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 All 173 releases
← All changes | inc/queue/class-berqUpload.php +5 -4 4.0.17 → 4.1.18 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2
3 3 use BerqWP\Cache;
4 -use function BerqWP\Vendor\SimpleHtmlDom\berqwp_str_get_html;
4 +use BerqWP_Deps\voku\helper\HtmlDomParser;
5 5
6 6 class berqUpload
7 7 {
8 8 static $resources = [];
@@ -57,9 +57,9 @@
57 57 $html = preg_replace('/berqwpnocache%3D\d+(%26)?/', '', $html);
58 58 }
59 59
60 60 // Parse HTML once and reuse the DOM across all asset extraction methods
61 - $dom = berqwp_str_get_html($html);
61 + $dom = HtmlDomParser::str_get_html($html);
62 62
63 63 $start = microtime(true);
64 64 self::process_css($dom);
65 65 $end = microtime(true);
@@ -334,9 +334,9 @@
334 334 // $berq_log->info("Last chunk: " . print_r($chunk, true));
335 335 }
336 336
337 337 // Use scoped Guzzle client
338 - $client = new \BerqWP\GuzzleHttp\Client([
338 + $client = new \BerqWP_Deps\GuzzleHttp\Client([
339 339 'timeout' => 60,
340 340 'verify' => false, // Disable SSL verification
341 341 ]);
342 342
@@ -497,9 +497,9 @@
497 497 throw new \Exception('Could not upload page to BerqWP server');
498 498 }
499 499
500 500 return true;
501 - } catch (\BerqWP\GuzzleHttp\Exception\RequestException $e) {
501 + } catch (\BerqWP_Deps\GuzzleHttp\Exception\RequestException $e) {
502 502 $berq_log->error("Guzzle request failed: " . $e->getMessage());
503 503 throw new \Exception('Could not upload page to BerqWP server: ' . $e->getMessage());
504 504 } catch (\Exception $e) {
505 505 $berq_log->error("Upload failed: " . $e->getMessage());
@@ -704,8 +704,9 @@
704 704
705 705 // Allow other plugins to modify cache html
706 706 $html = apply_filters('berqwp_cache_buffer', $html);
707 707
708 + $item['url'] = bwp_canonicalize_page_url($item['url']);
708 709 $cache = new Cache(null, bwp_get_cache_dir());
709 710 $cache->store_cache($item['url'], $html);
710 711
711 712 if (defined('BERQWP_DEV_MOCKS') && BERQWP_DEV_MOCKS) {