| 1 |
<?php |
| 2 |
namespace Elementor\Modules\NestedTabs; |
| 3 |
|
| 4 |
use Elementor\Plugin; |
| 5 |
use Elementor\Modules\NestedElements\Module as NestedElementsModule; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly |
| 9 |
} |
| 10 |
|
| 11 |
class Module extends \Elementor\Core\Base\Module { |
| 12 |
|
| 13 |
public static function is_active() { |
| 14 |
return Plugin::$instance->experiments->is_feature_active( NestedElementsModule::EXPERIMENT_NAME ); |
| 15 |
} |
| 16 |
|
| 17 |
public function get_name() { |
| 18 |
return 'nested-tabs'; |
| 19 |
} |
| 20 |
|
| 21 |
public function __construct() { |
| 22 |
parent::__construct(); |
| 23 |
|
| 24 |
add_action( 'elementor/editor/before_enqueue_scripts', function () { |
| 25 |
wp_enqueue_script( $this->get_name(), $this->get_js_assets_url( $this->get_name() ), [ |
| 26 |
'nested-elements', |
| 27 |
], ELEMENTOR_VERSION, true ); |
| 28 |
} ); |
| 29 |
} |
| 30 |
} |
| 31 |
|