PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.4
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.4
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/Core/Importer/Elementor.php +2 -4 3.6.13.4.4 View file →
@@ -8,9 +8,8 @@
8 8 use Elementor\Core\Settings\Page\Model;
9 9
10 10 use Elementor\Plugin as ElementorPlugin;
11 11 use Elementor\TemplateLibrary\Source_Local as ElementorLocal;
12 -use Templately\Core\Importer\Utils\Utils;
13 12
14 13 class Elementor extends ElementorLocal {
15 14 /**
16 15 * Get template data.
@@ -21,9 +20,8 @@
21 20 *
22 21 * @return array Remote Template data.
23 22 */
24 23 public function get_data( array $args ) {
25 - Utils::add_gd_editor_filter();
26 24 ElementorPlugin::$instance->editor->set_edit_mode( true );
27 25
28 26 $args['content'] = $this->replace_elements_ids( $args['content'] );
29 27 $args['content'] = $this->process_export_import_content( $args['content'], 'on_import' );
@@ -94,11 +92,11 @@
94 92 'status' => current_user_can( 'publish_posts' ) ? 'publish' : 'pending',
95 93 ];
96 94
97 95 $template_data = wp_parse_args( $template_data, $defaults );
98 - $type = $template_data['type'] == 'block' ? 'section' : $template_data['type'];
96 +
99 97 $document = ElementorPlugin::$instance->documents->create(
100 - $type,
98 + $template_data['type'],
101 99 [
102 100 'post_title' => $template_data['post_title'],
103 101 'post_status' => $template_data['status'],
104 102 'post_type' => 'page',