You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace Elementor\Modules\NestedElements;
use Elementor\Core\Experiments\Manager as Experiments_Manager;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends \Elementor\Core\Base\Module {
const EXPERIMENT_NAME = 'nested-elements';
public static function get_experimental_data() {
return [
'name' => self::EXPERIMENT_NAME,
'title' => esc_html__( 'Nested Elements', 'elementor' ),
'description' => sprintf(
esc_html__( 'Create a rich user experience by layering widgets together inside "Nested" Tabs, etc. When turned on, well automatically enable new nested features. Your old widgets wont be affected. %1$sLearn More%2$s', 'elementor' ),
'<a href="https://go.elementor.com/wp-dash-nested-elements/" target="_blank">',
'</a>'
),
'release_status' => Experiments_Manager::RELEASE_STATUS_BETA,
'default' => Experiments_Manager::STATE_INACTIVE,
'dependencies' => [
'container',
],
'new_site' => [
'default_active' => false,
'minimum_installation_version' => '3.10.0',
],
];
}
public function get_name() {
return 'nested-elements';
}
public function __construct() {
parent::__construct();
add_action( 'elementor/controls/controls_registered', function ( $controls_manager ) {
$controls_manager->register( new Controls\Control_Nested_Repeater() );
} );
add_action( 'elementor/editor/before_enqueue_scripts', function () {
wp_enqueue_script( $this->get_name(), $this->get_js_assets_url( $this->get_name() ), [
'elementor-common',
], ELEMENTOR_VERSION, true );
} );
}
}