PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / trunk
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization vtrunk
4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 All 135 releases
← All changes | inc/compatibilities/beaver_builder.php +15 -4 3.10.0 → trunk View file →
@@ -12,10 +12,10 @@
12 12 * Should we load the integration logic.
13 13 *
14 14 * @return bool Should we load.
15 15 */
16 - function should_load() {
17 - include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
16 + public function should_load() {
17 + include_once ABSPATH . 'wp-admin/includes/plugin.php';
18 18
19 19 return is_plugin_active( 'bb-plugin/fl-builder.php' ) || is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' );
20 20 }
21 21
@@ -27,13 +27,24 @@
27 27 'optml_lazyload_bg_selectors',
28 28 function ( $all_watchers ) {
29 29 $all_watchers[] = '.fl-col-content';
30 30 $all_watchers[] = '.fl-row-bg-photo > .fl-row-content-wrap';
31 + $all_watchers[] = '.fl-module-box';
31 32
32 33 return $all_watchers;
33 34 }
34 35 );
35 - add_filter( 'fl_builder_render_css', [ Optml_Main::instance()->manager, 'replace_content' ], PHP_INT_MAX, 1 );
36 - add_filter( 'fl_builder_render_js', [ Optml_Main::instance()->manager, 'replace_content' ], PHP_INT_MAX, 1 );
36 + add_filter( 'fl_builder_render_css', [ $this, 'replace_static_content' ], PHP_INT_MAX, 1 );
37 + add_filter( 'fl_builder_render_js', [ $this, 'replace_static_content' ], PHP_INT_MAX, 1 );
37 38 }
38 39
40 + /**
41 + * Replace urls in static content.
42 + *
43 + * @param string $content Content to replace.
44 + *
45 + * @return string Altered content.
46 + */
47 + public function replace_static_content( $content ) {
48 + return Optml_Main::instance()->manager->replace_content( $content, true );
49 + }
39 50 }