PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.0-dev2
Elementor Website Builder – more than just a page builder v3.1.0-dev2
4.3.4 4.3.3 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 All 457 releases
← All changes | core/documents-manager.php +5 -6 3.1.0-dev1 → 3.1.0-dev2 View file →
@@ -4,9 +4,8 @@
4 4 use Elementor\Core\Base\Document;
5 5 use Elementor\Core\Common\Modules\Ajax\Module as Ajax;
6 6 use Elementor\Core\DocumentTypes\Page;
7 7 use Elementor\Core\DocumentTypes\Post;
8 -use Elementor\DB;
9 8 use Elementor\Plugin;
10 9 use Elementor\TemplateLibrary\Source_Local;
11 10 use Elementor\Utils;
12 11
@@ -484,18 +483,18 @@
484 483
485 484 // Set the post as global post.
486 485 Plugin::$instance->db->switch_to_post( $document->get_post()->ID );
487 486
488 - $status = DB::STATUS_DRAFT;
487 + $status = Document::STATUS_DRAFT;
489 488
490 - if ( isset( $request['status'] ) && in_array( $request['status'], [ DB::STATUS_PUBLISH, DB::STATUS_PRIVATE, DB::STATUS_PENDING, DB::STATUS_AUTOSAVE ], true ) ) {
489 + if ( isset( $request['status'] ) && in_array( $request['status'], [ Document::STATUS_PUBLISH, Document::STATUS_PRIVATE, Document::STATUS_PENDING, Document::STATUS_AUTOSAVE ], true ) ) {
491 490 $status = $request['status'];
492 491 }
493 492
494 - if ( DB::STATUS_AUTOSAVE === $status ) {
493 + if ( Document::STATUS_AUTOSAVE === $status ) {
495 494 // If the post is a draft - save the `autosave` to the original draft.
496 495 // Allow a revision only if the original post is already published.
497 - if ( in_array( $document->get_post()->post_status, [ DB::STATUS_PUBLISH, DB::STATUS_PRIVATE ], true ) ) {
496 + if ( in_array( $document->get_post()->post_status, [ Document::STATUS_PUBLISH, Document::STATUS_PRIVATE ], true ) ) {
498 497 $document = $document->get_autosave( 0, true );
499 498 }
500 499 }
501 500
@@ -588,9 +587,9 @@
588 587
589 588 $this->switch_to_document( $document );
590 589
591 590 // Change mode to Builder
592 - Plugin::$instance->db->set_is_elementor_page( $post_id );
591 + $document->set_is_built_with_elementor( true );
593 592
594 593 $doc_config = $document->get_config();
595 594
596 595 return $doc_config;