PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / nested-tabs / module.php

module.php in Elementor Website Builder – more than just a page builder 4.2.0, at modules/nested-tabs/module.php

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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/frontend/after_register_styles', [ $this, 'register_styles' ] );
25
26 add_action( 'elementor/editor/before_enqueue_scripts', function () {
27 wp_enqueue_script( $this->get_name(), $this->get_js_assets_url( $this->get_name() ), [
28 'nested-elements',
29 ], ELEMENTOR_VERSION, true );
30 } );
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 }
52 }
53