PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.9
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.9
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 -12 3.6.83.4.9 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 );
@@ -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 );
@@ -158,13 +156,10 @@
158 156 return $template_data;
159 157 }
160 158
161 159 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' );
160 + $platform = $this->get_param( 'platform', 'elementor' );
161 + $id = $this->get_param( 'id', 0, 'intval' );
167 162
168 163 if( $id == 0 ) {
169 164 return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 );
170 165 }
@@ -178,11 +173,10 @@
178 173 }
179 174 }
180 175
181 176 @set_time_limit( 0 ); // Unlimited execution time for this request.
182 - Utils::add_gd_editor_filter();
183 177
184 - return $this->platform( $platform )->import_in_library( $id, $this, $settings, $template_type, $type );
178 + return $this->platform( $platform )->import_in_library( $id, $this );
185 179 }
186 180
187 181 public function import_as_page(){
188 182 $platform = $this->get_param( 'platform', 'elementor' );
@@ -187,9 +181,8 @@
187 181 public function import_as_page(){
188 182 $platform = $this->get_param( 'platform', 'elementor' );
189 183 $id = $this->get_param( 'id', 0, 'intval' );
190 184 $title = $this->get_param( 'title' );
191 - $settings = $this->get_param( 'settings', [], null );
192 185
193 186 if( $id == 0 ) {
194 187 return $this->error('invalid_item_id', __( 'Invalid ID is provided.', 'templately' ), 'import/page', 404 );
195 188 }
@@ -203,9 +196,8 @@
203 196 }
204 197 }
205 198
206 199 @set_time_limit( 0 ); // Unlimited execution time for this request.
207 - Utils::add_gd_editor_filter();
208 200
209 - return $this->platform( $platform )->create_page( $id, $title, $this, $settings );
201 + return $this->platform( $platform )->create_page( $id, $title, $this );
210 202 }
211 203 }