/var/www/html/wp-content/plugins/elementor/core/kits/documents/tabs/settings-background.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
namespace Elementor\Core\Kits\Documents\Tabs;

use 
Elementor\Controls_Manager;
use 
Elementor\Group_Control_Background;

if ( ! 
defined'ABSPATH' ) ) {
    exit; 
// Exit if accessed directly
}

class 
Settings_Background extends Tab_Base {

    public function 
get_id() {
        return 
'settings-background';
    }

    public function 
get_title() {
        return 
esc_html__'Background''elementor' );
    }

    public function 
get_group() {
        return 
'settings';
    }

    public function 
get_icon() {
        return 
'eicon-background';
    }

    public function 
get_help_url() {
        return 
'https://go.elementor.com/global-background/';
    }

    protected function 
register_tab_controls() {
        
$this->start_controls_section(
            
'section_background',
            [
                
'label' => $this->get_title(),
                
'tab' => $this->get_id(),
            ]
        );

        
$this->add_group_control(
            
Group_Control_Background::get_type(),
            [
                
'name' => 'body_background',
                
'types' => [ 'classic''gradient' ],
                
'selector' => '{{WRAPPER}}',
                
'fields_options' => [
                    
'background' => [
                        
'frontend_available' => true,
                    ],
                    
'color' => [
                        
'dynamic' => [],
                    ],
                    
'color_b' => [
                        
'dynamic' => [],
                    ],
                ],
            ]
        );

        
$this->add_control(
            
'mobile_browser_background',
            [
                
'label' => esc_html__'Mobile Browser Background''elementor' ),
                
'type' => Controls_Manager::COLOR,
                
'description' => esc_html__'The `theme-color` meta tag will only be available in supported browsers and devices.''elementor' ),
                
'separator' => 'before',
            ]
        );

        
$this->add_control(
            
'body_overscroll_behavior',
            [
                
'label' => esc_html__'Overscroll Behavior''elementor' ),
                
'type' => Controls_Manager::SELECT,
                
'options' => [
                    
'' => esc_html__'Default''elementor' ),
                    
'none' => esc_html__'None''elementor' ),
                    
'auto' => esc_html__'Auto''elementor' ),
                    
'contain' => esc_html__'Contain''elementor' ),
                ],
                
'separator' => 'before',
                
'selectors' => [
                    
'{{WRAPPER}}' => 'overscroll-behavior: {{VALUE}};',
                ],
            ]
        );

        
$this->end_controls_section();
    }
}