PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | includes/class-wp-optimize-delay-js.php +1 -11 4.5.3 → 4.7.0 View file →
@@ -40,9 +40,9 @@
40 40 *
41 41 * @return bool
42 42 */
43 43 public function should_process() {
44 - return ($this->is_delay_js_enabled() || $this->is_preload_js_enabled()) && !$this->is_edit_mode();
44 + return ($this->is_delay_js_enabled() || $this->is_preload_js_enabled()) && !WPO_Page_Builder_Compatibility::is_edit_mode();
45 45 }
46 46
47 47 /**
48 48 * Main processing function to manage JavaScript optimizations.
@@ -373,18 +373,8 @@
373 373 * @return string
374 374 */
375 375 private function get_scripts_pattern() {
376 376 return '/<script(.*)>(.*)<\/script>/Uis';
377 - }
378 -
379 - /**
380 - * Determines whether the page is in edit mode using page builders
381 - * Beaver Builder, Divi Theme, Elementor, and Oxygen Builder
382 - *
383 - * @return bool
384 - */
385 - private function is_edit_mode() {
386 - return isset($_GET['fl_builder']) || isset($_GET['et_fb']) || isset($_GET['elementor-preview']) || isset($_GET['oxygen']) || isset($_GET['ct_builder']); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We are not using any global values, only checking for existence
387 377 }
388 378 }
389 379
390 380 endif;