PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.4
Elementor Website Builder – more than just a page builder v3.1.4
4.3.0-beta3 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 All 452 releases
elementor / core / kits / documents / tabs / tab-base.php

tab-base.php in Elementor Website Builder – more than just a page builder 3.1.4, at core/kits/documents/tabs/tab-base.php

73 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Core\Kits\Documents\Tabs;
4
5 use Elementor\Controls_Manager;
6 use Elementor\Core\Kits\Documents\Kit;
7 use Elementor\Core\Kits\Manager;
8 use Elementor\Plugin;
9 use Elementor\Settings;
10 use Elementor\Sub_Controls_Stack;
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly
14 }
15
16 abstract class Tab_Base extends Sub_Controls_Stack {
17 /**
18 * @var Kit
19 */
20 protected $parent;
21
22 abstract protected function register_tab_controls();
23
24 public function get_group() {
25 return 'settings';
26 }
27
28 public function get_icon() {
29 return '';
30 }
31
32 public function get_help_url() {
33 return '';
34 }
35
36 public function get_additional_tab_content() {
37 return '';
38 }
39
40 public function register_controls() {
41 $this->register_tab();
42
43 $this->register_tab_controls();
44 }
45
46 public function on_save( $data ) {}
47
48 protected function register_tab() {
49 Controls_Manager::add_tab( $this->get_id(), $this->get_title() );
50 }
51
52 protected function add_default_globals_notice() {
53 // Get the current section config (array - section id and tab) to use for creating a unique control ID and name
54 $current_section = $this->parent->get_current_section();
55
56 /** @var Manager $module */
57 $kits_manager = Plugin::$instance->kits_manager;
58
59 if ( $kits_manager->is_custom_colors_enabled() || $kits_manager->is_custom_typography_enabled() ) {
60 $this->add_control(
61 $current_section['section'] . '_schemes_notice',
62 [
63 'name' => $current_section['section'] . '_schemes_notice',
64 'type' => Controls_Manager::RAW_HTML,
65 'raw' => sprintf( __( 'In order for Theme Style to affect all relevant Elementor elements, please disable Default Colors and Fonts from the <a href="%s" target="_blank">Settings Page</a>.', 'elementor' ), Settings::get_url() ),
66 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
67 'render_type' => 'ui',
68 ]
69 );
70 }
71 }
72 }
73