| Server IP : 45.33.98.47 / Your IP : 216.73.217.106 Web Server : Apache/2.4.66 (Debian) System : Linux 8783c923f53b 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/elementor/modules/variables/ |
Upload File : |
<?php
namespace Elementor\Modules\Variables;
use Elementor\Core\Base\Module as BaseModule;
use Elementor\Core\Experiments\Manager as ExperimentsManager;
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
use Elementor\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Module extends BaseModule {
const MODULE_NAME = 'e-variables';
const EXPERIMENT_NAME = 'e_variables';
public function get_name() {
return self::MODULE_NAME;
}
public static function get_experimental_data(): array {
return [
'name' => self::EXPERIMENT_NAME,
'title' => esc_html__( 'Variables', 'elementor' ),
'description' => esc_html__( 'Enable variables. (For this feature to work - Atomic Widgets must be active)', 'elementor' ),
'hidden' => true,
'default' => ExperimentsManager::STATE_INACTIVE,
'release_status' => ExperimentsManager::RELEASE_STATUS_ALPHA,
];
}
private function hooks() {
return new Hooks();
}
public function __construct() {
parent::__construct();
if ( ! $this->is_experiment_active() ) {
return;
}
$this->hooks()->register();
}
private function is_experiment_active(): bool {
return Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME )
&& Plugin::$instance->experiments->is_feature_active( AtomicWidgetsModule::EXPERIMENT_NAME );
}
}