| @@ -5,9 +5,8 @@ | ||
| 5 | 5 | use Elementor\Plugin; |
| 6 | 6 | use Elementor\Core\Experiments\Manager as Experiments_Manager; |
| 7 | 7 | use Templately\Core\Platform\Elementor; |
| 8 | 8 | use Templately\Core\Platform\Gutenberg; |
| 9 | -use Templately\Core\Importer\Utils\Utils; | |
| 10 | 9 | use Templately\Utils\Helper; |
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * @method Elementor|Gutenberg platform( $id ); |
| @@ -40,9 +39,8 @@ | ||
| 40 | 39 | } |
| 41 | 40 | } |
| 42 | 41 | |
| 43 | 42 | @set_time_limit( 0 ); // Unlimited execution time for this request. |
| 44 | - Utils::add_gd_editor_filter(); | |
| 45 | 43 | |
| 46 | 44 | switch ( $origin ) { |
| 47 | 45 | case 'cloud': |
| 48 | 46 | $template_data = $this->get_cloud_content( $id, $platform ); |
| @@ -160,9 +158,8 @@ | ||
| 160 | 158 | |
| 161 | 159 | public function import_in_library(){ |
| 162 | 160 | $platform = $this->get_param( 'platform', 'elementor' ); |
| 163 | 161 | $id = $this->get_param( 'id', 0, 'intval' ); |
| 164 | - $settings = $this->get_param( 'settings', [], null ); | |
| 165 | 162 | |
| 166 | 163 | if( $id == 0 ) { |
| 167 | 164 | return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 ); |
| 168 | 165 | } |
| @@ -176,11 +173,10 @@ | ||
| 176 | 173 | } |
| 177 | 174 | } |
| 178 | 175 | |
| 179 | 176 | @set_time_limit( 0 ); // Unlimited execution time for this request. |
| 180 | - Utils::add_gd_editor_filter(); | |
| 181 | 177 | |
| 182 | - return $this->platform( $platform )->import_in_library( $id, $this, $settings ); | |
| 178 | + return $this->platform( $platform )->import_in_library( $id, $this ); | |
| 183 | 179 | } |
| 184 | 180 | |
| 185 | 181 | public function import_as_page(){ |
| 186 | 182 | $platform = $this->get_param( 'platform', 'elementor' ); |
| @@ -185,9 +181,8 @@ | ||
| 185 | 181 | public function import_as_page(){ |
| 186 | 182 | $platform = $this->get_param( 'platform', 'elementor' ); |
| 187 | 183 | $id = $this->get_param( 'id', 0, 'intval' ); |
| 188 | 184 | $title = $this->get_param( 'title' ); |
| 189 | - $settings = $this->get_param( 'settings', [] ); | |
| 190 | 185 | |
| 191 | 186 | if( $id == 0 ) { |
| 192 | 187 | return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 ); |
| 193 | 188 | } |
| @@ -201,9 +196,8 @@ | ||
| 201 | 196 | } |
| 202 | 197 | } |
| 203 | 198 | |
| 204 | 199 | @set_time_limit( 0 ); // Unlimited execution time for this request. |
| 205 | - Utils::add_gd_editor_filter(); | |
| 206 | 200 | |
| 207 | - return $this->platform( $platform )->create_page( $id, $title, $this, $settings ); | |
| 201 | + return $this->platform( $platform )->create_page( $id, $title, $this ); | |
| 208 | 202 | } |
| 209 | 203 | } |