PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
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 / module.php

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

62 lines 1.5 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;
3
4 use Elementor\Core\Base\Module as BaseModule;
5 use Elementor\Modules\AtomicWidgets\Module as AtomicWidgets_Module;
6 use Elementor\Plugin;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 /**
13 * Elementor library module.
14 *
15 * Elementor library module handler class is responsible for registering and
16 * managing Elementor library modules.
17 *
18 * @since 2.0.0
19 */
20 class Module extends BaseModule {
21
22 /**
23 * Get module name.
24 *
25 * Retrieve the library module name.
26 *
27 * @since 2.0.0
28 * @access public
29 *
30 * @return string Module name.
31 */
32 public function get_name() {
33 return 'library';
34 }
35
36 /**
37 * Library module constructor.
38 *
39 * Initializing Elementor library module.
40 *
41 * @since 2.0.0
42 * @access public
43 */
44 public function __construct() {
45 add_action( 'elementor/documents/register', [ $this, 'register_documents' ] );
46 }
47
48 public function register_documents() {
49 Plugin::$instance->documents
50 ->register_document_type( 'not-supported', Documents\Not_Supported::get_class_full_name() )
51 ->register_document_type( 'page', Documents\Page::get_class_full_name() )
52 ->register_document_type( 'section', Documents\Section::get_class_full_name() );
53
54 $experiments_manager = Plugin::$instance->experiments;
55
56 if ( $experiments_manager->is_feature_active( 'container' ) ) {
57 Plugin::$instance->documents
58 ->register_document_type( 'container', Documents\Container::get_class_full_name() );
59 }
60 }
61 }
62