PluginProbe
Elementor Website Builder – more than just a page builder / 3.14.0-beta4
Elementor Website Builder – more than just a page builder v3.14.0-beta4
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 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 All 457 releases
elementor / modules / nested-accordion / module.php

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

66 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\NestedAccordion;
3
4 use Elementor\Core\Experiments\Manager;
5 use Elementor\Plugin;
6 use Elementor\Modules\NestedElements\Module as NestedElementsModule;
7 use Elementor\Core\Base\Module as BaseModule;
8
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit; // Exit if accessed directly
12 }
13
14 class Module extends BaseModule {
15
16 const EXPERIMENT_NAME = 'nested-accordion';
17
18 public static function is_active() {
19 return Plugin::$instance->experiments->is_feature_active( static::EXPERIMENT_NAME );
20 }
21
22 public function get_name() {
23 return static::EXPERIMENT_NAME;
24 }
25
26 public function get_widgets() {
27 return [
28 'Nested_Accordion',
29 ];
30 }
31
32 /**
33 * Add to the experiments
34 *
35 * @return array
36 */
37 public static function get_experimental_data() {
38 return [
39 'name' => static::EXPERIMENT_NAME,
40 'title' => esc_html__( 'Nested Accordion', 'elementor' ),
41 'description' => sprintf(
42 /* translators: 1: Link opening tag, 2: Link closing tag. */
43 esc_html__( 'Create a rich user experience by layering widgets together inside “Nested” Accordion, etc. %1$sLearn More%2$s', 'elementor' ),
44 '<a href="https://go.elementor.com/widget-nested-accordion" target="_blank">',
45 '</a>'
46 ),
47 'hidden' => true,
48 'release_status' => Manager::RELEASE_STATUS_ALPHA,
49 'default' => Manager::STATE_INACTIVE,
50 'dependencies' => [
51 'nested-elements',
52 ],
53 ];
54 }
55
56 public function __construct() {
57 parent::__construct();
58
59 add_action( 'elementor/editor/before_enqueue_scripts', function () {
60 wp_enqueue_script( $this->get_name(), $this->get_js_assets_url( $this->get_name() ), [
61 'nested-elements',
62 ], ELEMENTOR_VERSION, true );
63 } );
64 }
65 }
66