| @@ -5,15 +5,15 @@ | ||
| 5 | 5 | use Elementor\Core\Base\Module as BaseModule; |
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | - exit; // Exit if accessed directly. | |
| 9 | + exit; // Exit if accessed directly | |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | class Module extends BaseModule { |
| 13 | 13 | |
| 14 | 14 | public static function is_active() { |
| 15 | - return Plugin::$instance->experiments->is_feature_active( 'nested-elements', true ); | |
| 15 | + return Plugin::$instance->experiments->is_feature_active( 'nested-elements' ); | |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function get_name() { |
| 19 | 19 | return 'nested-accordion'; |
| @@ -21,30 +21,11 @@ | ||
| 21 | 21 | |
| 22 | 22 | public function __construct() { |
| 23 | 23 | parent::__construct(); |
| 24 | 24 | |
| 25 | - add_action( 'elementor/frontend/after_register_styles', [ $this, 'register_styles' ] ); | |
| 26 | - | |
| 27 | 25 | add_action( 'elementor/editor/before_enqueue_scripts', function () { |
| 28 | 26 | wp_enqueue_script( $this->get_name(), $this->get_js_assets_url( $this->get_name() ), [ |
| 29 | 27 | 'nested-elements', |
| 30 | 28 | ], ELEMENTOR_VERSION, true ); |
| 31 | 29 | } ); |
| 32 | - } | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * Register styles. | |
| 36 | - * | |
| 37 | - * At build time, Elementor compiles `/modules/nested-accordion/assets/scss/frontend.scss` | |
| 38 | - * to `/assets/css/widget-nested-accordion.min.css`. | |
| 39 | - * | |
| 40 | - * @return void | |
| 41 | - */ | |
| 42 | - public function register_styles() { | |
| 43 | - wp_register_style( | |
| 44 | - 'widget-nested-accordion', | |
| 45 | - $this->get_css_assets_url( 'widget-nested-accordion', null, true, true ), | |
| 46 | - [ 'elementor-frontend' ], | |
| 47 | - ELEMENTOR_VERSION | |
| 48 | - ); | |
| 49 | 30 | } |
| 50 | 31 | } |