| @@ -5,17 +5,12 @@ | ||
| 5 | 5 | use Elementor\Core\Base\Module as BaseModule; |
| 6 | 6 | use Elementor\Core\Experiments\Manager as ExperimentsManager; |
| 7 | 7 | use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule; |
| 8 | 8 | use Elementor\Modules\Variables\Classes\Variable_Types_Registry; |
| 9 | -use Elementor\Modules\Variables\ImportExportCustomization\Import_Export_Customization; | |
| 10 | -use Elementor\Modules\Variables\PropTypes\Color_Variable_Prop_Type; | |
| 11 | -use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type; | |
| 12 | -use Elementor\Modules\Variables\PropTypes\Size_Variable_Prop_Type; | |
| 13 | 9 | use Elementor\Plugin; |
| 14 | -use Elementor\Utils; | |
| 15 | 10 | |
| 16 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | - exit; | |
| 12 | + exit; // Exit if accessed directly. | |
| 18 | 13 | } |
| 19 | 14 | |
| 20 | 15 | class Module extends BaseModule { |
| 21 | 16 | const MODULE_NAME = 'e-variables'; |
| @@ -52,12 +47,9 @@ | ||
| 52 | 47 | $this->register_features(); |
| 53 | 48 | |
| 54 | 49 | $this->hooks()->register(); |
| 55 | 50 | |
| 56 | - ( new Import_Export_Customization() )->register_hooks(); | |
| 57 | - | |
| 58 | 51 | add_action( 'init', [ $this, 'init_variable_types_registry' ] ); |
| 59 | - add_action( 'elementor/editor/before_enqueue_scripts', fn () => $this->enqueue_editor_scripts() ); | |
| 60 | 52 | } |
| 61 | 53 | |
| 62 | 54 | private function register_features() { |
| 63 | 55 | Plugin::$instance->experiments->add_feature([ |
| @@ -83,22 +75,6 @@ | ||
| 83 | 75 | |
| 84 | 76 | |
| 85 | 77 | public function get_variable_types_registry(): Variable_Types_Registry { |
| 86 | 78 | return $this->variable_types_registry; |
| 87 | - } | |
| 88 | - | |
| 89 | - private function get_quota_config(): array { | |
| 90 | - return [ | |
| 91 | - Color_Variable_Prop_Type::get_key() => 100000, | |
| 92 | - Font_Variable_Prop_Type::get_key() => 100000, | |
| 93 | - ]; | |
| 94 | - } | |
| 95 | - | |
| 96 | - public function enqueue_editor_scripts() { | |
| 97 | - | |
| 98 | - wp_add_inline_script( | |
| 99 | - 'elementor-common', | |
| 100 | - 'window.ElementorVariablesQuotaConfig = ' . wp_json_encode( $this->get_quota_config() ) . ';', | |
| 101 | - 'before' | |
| 102 | - ); | |
| 103 | 79 | } |
| 104 | 80 | } |