| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\AtomicOptIn; |
| 4 |
|
| 5 |
use Elementor\Utils; |
| 6 |
|
| 7 |
class PanelChip { |
| 8 |
public function init() { |
| 9 |
add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_scripts' ] ); |
| 10 |
} |
| 11 |
|
| 12 |
public function enqueue_scripts() { |
| 13 |
$min_suffix = Utils::is_script_debug() ? '' : '.min'; |
| 14 |
|
| 15 |
wp_enqueue_script( |
| 16 |
'editor-v4-opt-in-alphachip', |
| 17 |
ELEMENTOR_ASSETS_URL . 'js/editor-v4-opt-in-alphachip' . $min_suffix . '.js', |
| 18 |
[ |
| 19 |
'react', |
| 20 |
'react-dom', |
| 21 |
'elementor-common', |
| 22 |
'elementor-v2-ui', |
| 23 |
], |
| 24 |
ELEMENTOR_VERSION, |
| 25 |
true |
| 26 |
); |
| 27 |
|
| 28 |
wp_set_script_translations( 'editor-v4-opt-in-alphachip', 'elementor' ); |
| 29 |
} |
| 30 |
} |
| 31 |
|