PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.4
Elementor Website Builder – more than just a page builder v3.31.4
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | app/modules/import-export-customization/runners/revert/templates.php +5 -36 4.3.0 → 3.31.4 View file →
@@ -1,49 +1,18 @@
1 1 <?php
2 2
3 3 namespace Elementor\App\Modules\ImportExportCustomization\Runners\Revert;
4 4
5 -use Elementor\Plugin;
6 -use Elementor\TemplateLibrary\Source_Local;
7 -use Elementor\Core\Base\Document;
8 -
9 5 class Templates extends Revert_Runner_Base {
6 + /**
7 + * The implement of this runner is part of the Pro plugin.
8 + */
10 9 public static function get_name(): string {
11 10 return 'templates';
12 11 }
13 12
14 13 public function should_revert( array $data ): bool {
15 - return (
16 - isset( $data['runners'] ) &&
17 - array_key_exists( static::get_name(), $data['runners'] )
18 - );
14 + return false;
19 15 }
20 16
21 - public function revert( array $data ) {
22 - $template_types = array_values( Source_Local::get_template_types() );
23 -
24 - $query_args = [
25 - 'post_type' => Source_Local::CPT,
26 - 'post_status' => 'any',
27 - 'posts_per_page' => -1,
28 - 'meta_query' => [
29 - [
30 - 'key' => Document::TYPE_META_KEY,
31 - 'value' => $template_types,
32 - ],
33 - [
34 - 'key' => static::META_KEY_ELEMENTOR_IMPORT_SESSION_ID,
35 - 'value' => $data['session_id'],
36 - ],
37 - ],
38 - ];
39 -
40 - $templates_query = new \WP_Query( $query_args );
41 -
42 - foreach ( $templates_query->posts as $template_post ) {
43 - $template_document = Plugin::$instance->documents->get( $template_post->ID );
44 - $template_document->delete();
45 - }
46 -
47 - do_action( 'elementor/import-export-customization/revert/templates', $data );
48 - }
17 + public function revert( array $data ) { }
49 18 }