Completed
Push — update/build-to-prepare-for-wp... ( a960c5...31a28f )
by
unknown
156:22 queued 147:01
created

Jetpack_BeaverBuilderCompat::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Beaverbuilder Compatibility.
4
 *
5
 * @package Jetpack.
6
 */
7
8
namespace Automattic\Jetpack\Third_Party;
9
10
add_action( 'init', __NAMESPACE__ . '\beaverbuilder_refresh' );
11
12
/**
13
 * If masterbar module is active force BeaverBuilder to refresh when publishing a layout.
14
 */
15
function beaverbuilder_refresh() {
16
	if ( \Jetpack::is_module_active( 'masterbar' ) ) {
17
		add_filter( 'fl_builder_should_refresh_on_publish', '__return_true' );
18
	}
19
}
20