wordpress/php-fpm/wordpress_files/plugins/jetpack/3rd-party/beaverbuilder.php

21 lines
485 B
PHP
Raw Permalink Normal View History

2020-05-22 03:40:23 +02:00
<?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();