PluginProbe
Hello Plus / 1.1.1
Hello Plus v1.1.1
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7.0 1.7.1 1.7.2 1.7.3 All 30 releases
hello-plus / modules / theme / module.php

module.php in Hello Plus 1.1.1, at modules/theme/module.php

65 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace HelloPlus\Modules\Theme;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly.
7 }
8
9 use HelloPlus\Includes\Module_Base;
10
11 /**
12 * Theme module
13 *
14 * @package HelloPlus
15 * @subpackage HelloPlusModules
16 */
17 class Module extends Module_Base {
18 const HELLOPLUS_EDITOR_CATEGORY_SLUG = 'helloplus';
19
20 /**
21 * @inheritDoc
22 */
23 public static function get_name(): string {
24 return 'theme';
25 }
26
27 /**
28 * @inheritDoc
29 */
30 protected function get_component_ids(): array {
31 return [
32 'Theme_Overrides',
33 'Theme_Dependency',
34 ];
35 }
36
37 /**
38 * @param \Elementor\Elements_Manager $elements_manager
39 *
40 * @return void
41 */
42 public function add_hello_plus_e_panel_categories( \Elementor\Elements_Manager $elements_manager ) {
43 $categories = $elements_manager->get_categories();
44 if ( ! empty( $categories[ self::HELLOPLUS_EDITOR_CATEGORY_SLUG ] ) ) {
45 return;
46 }
47
48 $elements_manager->add_category(
49 self::HELLOPLUS_EDITOR_CATEGORY_SLUG,
50 [
51 'title' => esc_html__( 'Hello+', 'hello-plus' ),
52 'icon' => 'fa fa-plug',
53 ]
54 );
55 }
56
57 /**
58 * @inheritDoc
59 */
60 protected function register_hooks(): void {
61 parent::register_hooks();
62 add_action( 'elementor/elements/categories_registered', [ $this, 'add_hello_plus_e_panel_categories' ] );
63 }
64 }
65