mirror of
https://git.sindominio.net/estibadores/wordpress.git
synced 2024-11-14 23:21:07 +01:00
21 lines
485 B
PHP
21 lines
485 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Beaverbuilder Compatibility.
|
||
|
*/
|
||
|
class Jetpack_BeaverBuilderCompat {
|
||
|
|
||
|
function __construct() {
|
||
|
add_action( 'init', array( $this, 'beaverbuilder_refresh' ) );
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* If masterbar module is active force BeaverBuilder to refresh when publishing a layout.
|
||
|
*/
|
||
|
function beaverbuilder_refresh() {
|
||
|
if ( Jetpack::is_module_active( 'masterbar' ) ) {
|
||
|
add_filter( 'fl_builder_should_refresh_on_publish', '__return_true' );
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
new Jetpack_BeaverBuilderCompat();
|