PluginProbe
Elementor Website Builder – more than just a page builder / 4.1.5
Elementor Website Builder – more than just a page builder v4.1.5
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 / library-document.php

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

85 lines 1.8 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\Base\Document;
5 use Elementor\Modules\Library\Traits\Library;
6 use Elementor\TemplateLibrary\Source_Local;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 /**
13 * Elementor library document.
14 *
15 * Elementor library document handler class is responsible for handling
16 * a document of the library type.
17 *
18 * @since 2.0.0
19 */
20 abstract class Library_Document extends Document {
21
22 // Library Document Trait
23 use Library;
24
25 /**
26 * The taxonomy type slug for the library document.
27 */
28 const TAXONOMY_TYPE_SLUG = 'elementor_library_type';
29
30 /**
31 * The customization group for Kit Export.
32 */
33 const EXPORT_GROUP = 'site-templates';
34
35 /**
36 * Get document properties.
37 *
38 * Retrieve the document properties.
39 *
40 * @since 2.0.0
41 * @access public
42 * @static
43 *
44 * @return array Document properties.
45 */
46 public static function get_properties() {
47 $properties = parent::get_properties();
48
49 $properties['admin_tab_group'] = 'library';
50 $properties['show_in_library'] = true;
51 $properties['register_type'] = true;
52 $properties['cpt'] = [ Source_Local::CPT ];
53 $properties['export_group'] = static::EXPORT_GROUP;
54
55 return $properties;
56 }
57
58 /**
59 * Get initial config.
60 *
61 * Retrieve the current element initial configuration.
62 *
63 * Adds more configuration on top of the controls list and the tabs assigned
64 * to the control. This method also adds element name, type, icon and more.
65 *
66 * @since 2.9.0
67 * @access protected
68 *
69 * @return array The initial config.
70 */
71 public function get_initial_config() {
72 $config = parent::get_initial_config();
73
74 $config['library'] = [
75 'save_as_same_type' => true,
76 ];
77
78 return $config;
79 }
80
81 public function get_content( $with_css = false ) {
82 return do_shortcode( parent::get_content( $with_css ) );
83 }
84 }
85