| @@ -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 ); |
| @@ -39,10 +38,8 @@ | ||
| 39 | 38 | ); |
| 40 | 39 | } |
| 41 | 40 | } |
| 42 | 41 | |
| 43 | - @set_time_limit( 0 ); // Unlimited execution time for this request. | |
| 44 | - Utils::add_gd_editor_filter(); | |
| 45 | 42 | |
| 46 | 43 | switch ( $origin ) { |
| 47 | 44 | case 'cloud': |
| 48 | 45 | $template_data = $this->get_cloud_content( $id, $platform ); |
| @@ -160,9 +157,8 @@ | ||
| 160 | 157 | |
| 161 | 158 | public function import_in_library(){ |
| 162 | 159 | $platform = $this->get_param( 'platform', 'elementor' ); |
| 163 | 160 | $id = $this->get_param( 'id', 0, 'intval' ); |
| 164 | - $settings = $this->get_param( 'settings', [], null ); | |
| 165 | 161 | |
| 166 | 162 | if( $id == 0 ) { |
| 167 | 163 | return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 ); |
| 168 | 164 | } |
| @@ -175,12 +171,9 @@ | ||
| 175 | 171 | ); |
| 176 | 172 | } |
| 177 | 173 | } |
| 178 | 174 | |
| 179 | - @set_time_limit( 0 ); // Unlimited execution time for this request. | |
| 180 | - Utils::add_gd_editor_filter(); | |
| 181 | - | |
| 182 | - return $this->platform( $platform )->import_in_library( $id, $this, $settings ); | |
| 175 | + return $this->platform( $platform )->import_in_library( $id, $this ); | |
| 183 | 176 | } |
| 184 | 177 | |
| 185 | 178 | public function import_as_page(){ |
| 186 | 179 | $platform = $this->get_param( 'platform', 'elementor' ); |
| @@ -185,9 +178,8 @@ | ||
| 185 | 178 | public function import_as_page(){ |
| 186 | 179 | $platform = $this->get_param( 'platform', 'elementor' ); |
| 187 | 180 | $id = $this->get_param( 'id', 0, 'intval' ); |
| 188 | 181 | $title = $this->get_param( 'title' ); |
| 189 | - $settings = $this->get_param( 'settings', [] ); | |
| 190 | 182 | |
| 191 | 183 | if( $id == 0 ) { |
| 192 | 184 | return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 ); |
| 193 | 185 | } |
| @@ -200,10 +192,7 @@ | ||
| 200 | 192 | ); |
| 201 | 193 | } |
| 202 | 194 | } |
| 203 | 195 | |
| 204 | - @set_time_limit( 0 ); // Unlimited execution time for this request. | |
| 205 | - Utils::add_gd_editor_filter(); | |
| 206 | - | |
| 207 | - return $this->platform( $platform )->create_page( $id, $title, $this, $settings ); | |
| 196 | + return $this->platform( $platform )->create_page( $id, $title, $this ); | |
| 208 | 197 | } |
| 209 | 198 | } |