PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.2
Elementor Website Builder – more than just a page builder v3.1.2
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 4.0.7 All 451 releases
elementor / modules / library / documents / page.php

page.php in Elementor Website Builder – more than just a page builder 3.1.2, at modules/library/documents/page.php

98 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\Library\Documents;
3
4 use Elementor\Core\DocumentTypes\Post;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 /**
11 * Elementor page library document.
12 *
13 * Elementor page library document handler class is responsible for
14 * handling a document of a page type.
15 *
16 * @since 2.0.0
17 */
18 class Page extends Library_Document {
19
20 /**
21 * Get document properties.
22 *
23 * Retrieve the document properties.
24 *
25 * @since 2.0.0
26 * @access public
27 * @static
28 *
29 * @return array Document properties.
30 */
31 public static function get_properties() {
32 $properties = parent::get_properties();
33
34 $properties['support_wp_page_templates'] = true;
35 $properties['support_kit'] = true;
36
37 return $properties;
38 }
39
40 /**
41 * Get document name.
42 *
43 * Retrieve the document name.
44 *
45 * @since 2.0.0
46 * @access public
47 *
48 * @return string Document name.
49 */
50 public function get_name() {
51 return 'page';
52 }
53
54 /**
55 * Get document title.
56 *
57 * Retrieve the document title.
58 *
59 * @since 2.0.0
60 * @access public
61 * @static
62 *
63 * @return string Document title.
64 */
65 public static function get_title() {
66 return __( 'Page', 'elementor' );
67 }
68
69 /**
70 * @since 2.1.3
71 * @access public
72 */
73 public function get_css_wrapper_selector() {
74 return 'body.elementor-page-' . $this->get_main_id();
75 }
76
77 /**
78 * @since 3.1.0
79 * @access protected
80 */
81 protected function register_controls() {
82 parent::register_controls();
83
84 Post::register_hide_title_control( $this );
85
86 Post::register_style_controls( $this );
87 }
88
89 protected function get_remote_library_config() {
90 $config = parent::get_remote_library_config();
91
92 $config['type'] = 'page';
93 $config['default_route'] = 'templates/pages';
94
95 return $config;
96 }
97 }
98