PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.0
Elementor Website Builder – more than just a page builder v3.2.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 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / modules / landing-pages / documents / landing-page.php

landing-page.php in Elementor Website Builder – more than just a page builder 3.2.0, at modules/landing-pages/documents/landing-page.php

91 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\LandingPages\Documents;
3
4 use Elementor\Core\DocumentTypes\PageBase;
5 use Elementor\Modules\LandingPages\Module as Landing_Pages_Module;
6 use Elementor\Modules\Library\Traits\Library;
7 use Elementor\Modules\PageTemplates\Module as Page_Templates_Module;
8 use Elementor\Plugin;
9 use Elementor\TemplateLibrary\Source_Local;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly
13 }
14
15 class Landing_Page extends PageBase {
16
17 // Library Document Trait
18 use Library;
19
20 public static function get_properties() {
21 $properties = parent::get_properties();
22
23 $properties['support_kit'] = true;
24 $properties['show_in_library'] = true;
25 $properties['cpt'] = [ Landing_Pages_Module::CPT ];
26
27 return $properties;
28 }
29
30 /**
31 * @access public
32 */
33 public function get_name() {
34 return Landing_Pages_Module::DOCUMENT_TYPE;
35 }
36
37 /**
38 * @access public
39 * @static
40 */
41 public static function get_title() {
42 return __( 'Landing Page', 'elementor' );
43 }
44
45 /**
46 * Save Document.
47 *
48 * Save an Elementor document.
49 *
50 * @since 3.1.0
51 * @access public
52 *
53 * @param $data
54 *
55 * @return bool
56 */
57 public function save( $data ) {
58 // This is for the first time a Landing Page is created. It is done in order to load a new Landing Page with
59 // 'Canvas' as the default page template.
60 if ( empty( $data['settings']['template'] ) ) {
61 $data['settings']['template'] = Page_Templates_Module::TEMPLATE_CANVAS;
62 }
63
64 parent::save( $data );
65 }
66
67 /**
68 * Admin Columns Content
69 *
70 * @since 3.1.0
71 *
72 * @param $column_name
73 * @access public
74 */
75 public function admin_columns_content( $column_name ) {
76 if ( 'elementor_library_type' === $column_name ) {
77 $this->print_admin_column_type();
78 }
79 }
80
81 protected function get_remote_library_config() {
82 $config = [
83 'type' => 'lp',
84 'default_route' => 'templates/landing-pages',
85 'autoImportSettings' => true,
86 ];
87
88 return array_replace_recursive( parent::get_remote_library_config(), $config );
89 }
90 }
91