PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.5
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.5
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/API/Import.php +4 -17 3.6.83.4.5 View file →
@@ -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 );
@@ -158,13 +155,10 @@
158 155 return $template_data;
159 156 }
160 157
161 158 public function import_in_library(){
162 - $platform = $this->get_param( 'platform', 'elementor' );
163 - $id = $this->get_param( 'id', 0, 'intval' );
164 - $settings = $this->get_param( 'settings', [], null );
165 - $template_type = $this->get_param( 'template_type', '', 'sanitize_text_field' );
166 - $type = $this->get_param( 'type', '', 'sanitize_text_field' );
159 + $platform = $this->get_param( 'platform', 'elementor' );
160 + $id = $this->get_param( 'id', 0, 'intval' );
167 161
168 162 if( $id == 0 ) {
169 163 return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 );
170 164 }
@@ -177,12 +171,9 @@
177 171 );
178 172 }
179 173 }
180 174
181 - @set_time_limit( 0 ); // Unlimited execution time for this request.
182 - Utils::add_gd_editor_filter();
183 -
184 - return $this->platform( $platform )->import_in_library( $id, $this, $settings, $template_type, $type );
175 + return $this->platform( $platform )->import_in_library( $id, $this );
185 176 }
186 177
187 178 public function import_as_page(){
188 179 $platform = $this->get_param( 'platform', 'elementor' );
@@ -187,9 +178,8 @@
187 178 public function import_as_page(){
188 179 $platform = $this->get_param( 'platform', 'elementor' );
189 180 $id = $this->get_param( 'id', 0, 'intval' );
190 181 $title = $this->get_param( 'title' );
191 - $settings = $this->get_param( 'settings', [], null );
192 182
193 183 if( $id == 0 ) {
194 184 return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 );
195 185 }
@@ -202,10 +192,7 @@
202 192 );
203 193 }
204 194 }
205 195
206 - @set_time_limit( 0 ); // Unlimited execution time for this request.
207 - Utils::add_gd_editor_filter();
208 -
209 - return $this->platform( $platform )->create_page( $id, $title, $this, $settings );
196 + return $this->platform( $platform )->create_page( $id, $title, $this );
210 197 }
211 198 }