-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds full compatibility with Beaver Builder, processing images …
…from the generated css
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/** | ||
* Class Optml_beaver_builder. | ||
* | ||
* @reason Beaver builder offload the CSS in a separate file, which we access and process the image urls. | ||
*/ | ||
class Optml_beaver_builder extends Optml_compatibility { | ||
|
||
|
||
/** | ||
* Should we load the integration logic. | ||
* | ||
* @return bool Should we load. | ||
*/ | ||
function should_load() { | ||
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | ||
|
||
return is_plugin_active( 'bb-plugin/fl-builder.php' ) || is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ); | ||
} | ||
|
||
/** | ||
* Register integration details. | ||
*/ | ||
public function register() { | ||
add_filter( 'fl_builder_render_css', [ Optml_Main::instance()->manager, 'replace_content' ], PHP_INT_MAX, 1 ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"optimole-wp.php":"f950ffdf356d41cad77f24a4fed3c1e1"} | ||
{"optimole-wp.php":"405e35cd1cecc377bd06aa40d3bd3593"} |