| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | use Elementor\Plugin; |
| 5 | 5 | use Elementor\Modules\NestedElements\Module as NestedElementsModule; |
| 6 | 6 | |
| 7 | 7 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | - exit; // Exit if accessed directly. | |
| 8 | + exit; // Exit if accessed directly | |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | class Module extends \Elementor\Core\Base\Module { |
| 12 | 12 | |
| @@ -20,33 +20,11 @@ | ||
| 20 | 20 | |
| 21 | 21 | public function __construct() { |
| 22 | 22 | parent::__construct(); |
| 23 | 23 | |
| 24 | - add_action( 'elementor/frontend/after_register_styles', [ $this, 'register_styles' ] ); | |
| 25 | - | |
| 26 | 24 | add_action( 'elementor/editor/before_enqueue_scripts', function () { |
| 27 | 25 | wp_enqueue_script( $this->get_name(), $this->get_js_assets_url( $this->get_name() ), [ |
| 28 | 26 | 'nested-elements', |
| 29 | 27 | ], ELEMENTOR_VERSION, true ); |
| 30 | 28 | } ); |
| 31 | - } | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * Register styles. | |
| 35 | - * | |
| 36 | - * At build time, Elementor compiles `/modules/nested-tabs/assets/scss/frontend.scss` | |
| 37 | - * to `/assets/css/widget-nested-tabs.min.css`. | |
| 38 | - * | |
| 39 | - * @return void | |
| 40 | - */ | |
| 41 | - public function register_styles() { | |
| 42 | - $direction_suffix = is_rtl() ? '-rtl' : ''; | |
| 43 | - $has_custom_breakpoints = Plugin::$instance->breakpoints->has_custom_breakpoints(); | |
| 44 | - | |
| 45 | - wp_register_style( | |
| 46 | - 'widget-nested-tabs', | |
| 47 | - $this->get_frontend_file_url( "widget-nested-tabs{$direction_suffix}.min.css", $has_custom_breakpoints ), | |
| 48 | - [ 'elementor-frontend' ], | |
| 49 | - $has_custom_breakpoints ? null : ELEMENTOR_VERSION | |
| 50 | - ); | |
| 51 | 29 | } |
| 52 | 30 | } |