| @@ -9,9 +9,8 @@ | ||
| 9 | 9 | use Elementor\Modules\Variables\PropTypes\Size_Variable_Prop_Type; |
| 10 | 10 | use Elementor\Modules\Variables\Services\Batch_Operations\Batch_Processor; |
| 11 | 11 | use Elementor\Modules\Variables\Services\Variables_Service; |
| 12 | 12 | use Elementor\Modules\Variables\Storage\Variables_Repository; |
| 13 | -use Elementor\Modules\Variables\Utils\Template_Library_Variables; | |
| 14 | 13 | use Elementor\Plugin; |
| 15 | 14 | use Elementor\Core\Files\CSS\Post as Post_CSS; |
| 16 | 15 | use Elementor\Modules\Variables\Classes\CSS_Renderer as Variables_CSS_Renderer; |
| 17 | 16 | use Elementor\Modules\Variables\Classes\Fonts; |
| @@ -21,9 +20,9 @@ | ||
| 21 | 20 | use Elementor\Modules\Variables\Classes\Style_Transformers; |
| 22 | 21 | use Elementor\Modules\Variables\Classes\Variables; |
| 23 | 22 | |
| 24 | 23 | if ( ! defined( 'ABSPATH' ) ) { |
| 25 | - exit; | |
| 24 | + exit; // Exit if accessed directly. | |
| 26 | 25 | } |
| 27 | 26 | |
| 28 | 27 | class Hooks { |
| 29 | 28 | const PACKAGES = [ |
| @@ -36,10 +35,9 @@ | ||
| 36 | 35 | ->register_packages() |
| 37 | 36 | ->register_fonts() |
| 38 | 37 | ->register_api_endpoints() |
| 39 | 38 | ->filter_for_style_schema() |
| 40 | - ->register_variable_types() | |
| 41 | - ->register_template_library_import(); | |
| 39 | + ->register_variable_types(); | |
| 42 | 40 | |
| 43 | 41 | return $this; |
| 44 | 42 | } |
| 45 | 43 | |
| @@ -130,38 +128,6 @@ | ||
| 130 | 128 | Plugin::$instance->kits_manager->get_active_kit() |
| 131 | 129 | ); |
| 132 | 130 | |
| 133 | 131 | return new Variables_Service( $repository, new Batch_Processor() ); |
| 134 | - } | |
| 135 | - | |
| 136 | - private function register_template_library_import() { | |
| 137 | - add_filter( | |
| 138 | - 'elementor/template_library/export/build_snapshots', | |
| 139 | - [ Template_Library_Variables::class, 'add_variables_snapshot' ], | |
| 140 | - 20, | |
| 141 | - 4 | |
| 142 | - ); | |
| 143 | - | |
| 144 | - add_filter( | |
| 145 | - 'elementor/template_library/get_data/extract_snapshots', | |
| 146 | - [ Template_Library_Variables::class, 'extract_variables_from_data' ], | |
| 147 | - 10, | |
| 148 | - 3 | |
| 149 | - ); | |
| 150 | - | |
| 151 | - add_filter( | |
| 152 | - 'elementor/template_library/import/process_content', | |
| 153 | - [ Template_Library_Variables::class, 'process_variables_import' ], | |
| 154 | - 10, | |
| 155 | - 3 | |
| 156 | - ); | |
| 157 | - | |
| 158 | - add_filter( | |
| 159 | - 'elementor/global_classes/import/transform_snapshot', | |
| 160 | - [ Template_Library_Variables::class, 'transform_variables_in_classes_snapshot' ], | |
| 161 | - 10, | |
| 162 | - 4 | |
| 163 | - ); | |
| 164 | - | |
| 165 | - return $this; | |
| 166 | 132 | } |
| 167 | 133 | } |