PluginProbe
Elementor Website Builder – more than just a page builder / 3.4.6
Elementor Website Builder – more than just a page builder v3.4.6
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.4.6, at modules/library/documents/page.php

92 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 public static function get_type() {
41 return 'page';
42 }
43
44 /**
45 * Get document title.
46 *
47 * Retrieve the document title.
48 *
49 * @since 2.0.0
50 * @access public
51 * @static
52 *
53 * @return string Document title.
54 */
55 public static function get_title() {
56 return esc_html__( 'Page', 'elementor' );
57 }
58
59 public static function get_plural_title() {
60 return __( 'Pages', 'elementor' );
61 }
62
63 /**
64 * @since 2.1.3
65 * @access public
66 */
67 public function get_css_wrapper_selector() {
68 return 'body.elementor-page-' . $this->get_main_id();
69 }
70
71 /**
72 * @since 3.1.0
73 * @access protected
74 */
75 protected function register_controls() {
76 parent::register_controls();
77
78 Post::register_hide_title_control( $this );
79
80 Post::register_style_controls( $this );
81 }
82
83 protected function get_remote_library_config() {
84 $config = parent::get_remote_library_config();
85
86 $config['type'] = 'page';
87 $config['default_route'] = 'templates/pages';
88
89 return $config;
90 }
91 }
92