| 1 |
<?php |
| 2 |
/** |
| 3 |
* Builder Plugin Compatibility Code |
| 4 |
* |
| 5 |
* @package Themify_Builder |
| 6 |
* @subpackage Themify_Builder/classes |
| 7 |
*/ |
| 8 |
|
| 9 |
class Themify_Builder_Plugin_Compat_polylang2 { |
| 10 |
|
| 11 |
static function init() { |
| 12 |
add_filter( 'pll_copy_post_metas', [ __CLASS__, 'pll_copy_post_metas' ], 20, 2 ); |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* Copy Builder data when translating posts |
| 17 |
*/ |
| 18 |
public static function pll_copy_post_metas( $metas, $sync ) { |
| 19 |
if ( ! $sync ) { |
| 20 |
$metas[] = '_themify_builder_settings_json'; |
| 21 |
} |
| 22 |
|
| 23 |
return $metas; |
| 24 |
} |
| 25 |
} |