| @@ -5,9 +5,8 @@ | ||
| 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 | 9 | use Elementor\Modules\Variables\PropTypes\Color_Variable_Prop_Type; |
| 11 | 10 | use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type; |
| 12 | 11 | use Elementor\Modules\Variables\PropTypes\Size_Variable_Prop_Type; |
| 13 | 12 | use Elementor\Plugin; |
| @@ -13,9 +12,9 @@ | ||
| 13 | 12 | use Elementor\Plugin; |
| 14 | 13 | use Elementor\Utils; |
| 15 | 14 | |
| 16 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | - exit; | |
| 16 | + exit; // Exit if accessed directly. | |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | 19 | class Module extends BaseModule { |
| 21 | 20 | const MODULE_NAME = 'e-variables'; |
| @@ -52,10 +51,8 @@ | ||
| 52 | 51 | $this->register_features(); |
| 53 | 52 | |
| 54 | 53 | $this->hooks()->register(); |
| 55 | 54 | |
| 56 | - ( new Import_Export_Customization() )->register_hooks(); | |
| 57 | - | |
| 58 | 55 | add_action( 'init', [ $this, 'init_variable_types_registry' ] ); |
| 59 | 56 | add_action( 'elementor/editor/before_enqueue_scripts', fn () => $this->enqueue_editor_scripts() ); |
| 60 | 57 | } |
| 61 | 58 | |
| @@ -89,12 +86,16 @@ | ||
| 89 | 86 | private function get_quota_config(): array { |
| 90 | 87 | return [ |
| 91 | 88 | Color_Variable_Prop_Type::get_key() => 100000, |
| 92 | 89 | Font_Variable_Prop_Type::get_key() => 100000, |
| 90 | + Size_Variable_Prop_Type::get_key() => 0, | |
| 93 | 91 | ]; |
| 94 | 92 | } |
| 95 | 93 | |
| 96 | 94 | public function enqueue_editor_scripts() { |
| 95 | + if ( Utils::has_pro() ) { | |
| 96 | + return; | |
| 97 | + } | |
| 97 | 98 | |
| 98 | 99 | wp_add_inline_script( |
| 99 | 100 | 'elementor-common', |
| 100 | 101 | 'window.ElementorVariablesQuotaConfig = ' . wp_json_encode( $this->get_quota_config() ) . ';', |