/var/www/html/wp-content/plugins/elementor/core/kits/documents/tabs/settings-lightbox.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?php

namespace Elementor\Core\Kits\Documents\Tabs;

use 
Elementor\Controls_Manager;

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

class 
Settings_Lightbox extends Tab_Base {

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

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

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

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

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

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

        
$this->add_control(
            
'global_image_lightbox',
            [
                
'label' => esc_html__'Image Lightbox''elementor' ),
                
'type' => Controls_Manager::SWITCHER,
                
'default' => 'yes',
                
'description' => esc_html__'Open all image links in a lightbox popup window. The lightbox will automatically work on any link that leads to an image file.''elementor' ),
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_enable_counter',
            [
                
'label' => esc_html__'Counter''elementor' ),
                
'type' => Controls_Manager::SWITCHER,
                
'default' => 'yes',
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_enable_fullscreen',
            [
                
'label' => esc_html__'Fullscreen''elementor' ),
                
'type' => Controls_Manager::SWITCHER,
                
'default' => 'yes',
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_enable_zoom',
            [
                
'label' => esc_html__'Zoom''elementor' ),
                
'type' => Controls_Manager::SWITCHER,
                
'default' => 'yes',
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_enable_share',
            [
                
'label' => esc_html__'Share''elementor' ),
                
'type' => Controls_Manager::SWITCHER,
                
'default' => 'yes',
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_title_src',
            [
                
'label' => esc_html__'Title''elementor' ),
                
'type' => Controls_Manager::SELECT,
                
'options' => [
                    
'' => esc_html__'None''elementor' ),
                    
'title' => esc_html__'Title''elementor' ),
                    
'caption' => esc_html__'Caption''elementor' ),
                    
'alt' => esc_html__'Alt''elementor' ),
                    
'description' => esc_html__'Description''elementor' ),
                ],
                
'default' => 'title',
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_description_src',
            [
                
'label' => esc_html__'Description''elementor' ),
                
'type' => Controls_Manager::SELECT,
                
'options' => [
                    
'' => esc_html__'None''elementor' ),
                    
'title' => esc_html__'Title''elementor' ),
                    
'caption' => esc_html__'Caption''elementor' ),
                    
'alt' => esc_html__'Alt''elementor' ),
                    
'description' => esc_html__'Description''elementor' ),
                ],
                
'default' => 'description',
                
'frontend_available' => true,
            ]
        );

        
$this->add_control(
            
'lightbox_color',
            [
                
'label' => esc_html__'Background Color''elementor' ),
                
'type' => Controls_Manager::COLOR,
                
'selectors' => [
                    
'.elementor-lightbox' => 'background-color: {{VALUE}}',
                ],
            ]
        );

        
$this->add_control(
            
'lightbox_ui_color',
            [
                
'label' => esc_html__'UI Color''elementor' ),
                
'type' => Controls_Manager::COLOR,
                
'selectors' => [
                    
'.elementor-lightbox' => '--lightbox-ui-color: {{VALUE}}',
                ],
            ]
        );

        
$this->add_control(
            
'lightbox_ui_color_hover',
            [
                
'label' => esc_html__'UI Hover Color''elementor' ),
                
'type' => Controls_Manager::COLOR,
                
'selectors' => [
                    
'.elementor-lightbox' => '--lightbox-ui-color-hover: {{VALUE}}',
                ],
            ]
        );

        
$this->add_control(
            
'lightbox_text_color',
            [
                
'label' => esc_html__'Text Color''elementor' ),
                
'type' => Controls_Manager::COLOR,
                
'selectors' => [
                    
'.elementor-lightbox' => '--lightbox-text-color: {{VALUE}}',
                ],
            ]
        );

        
$this->add_control(
            
'lightbox_icons_size',
            [
                
'label' => esc_html__'Toolbar Icons Size''elementor' ),
                
'type' => Controls_Manager::SLIDER,
                
'size_units' => [ 'px''em''rem''vw''custom' ],
                
'selectors' => [
                    
'.elementor-lightbox' => '--lightbox-header-icons-size: {{SIZE}}{{UNIT}}',
                ],
                
'separator' => 'before',
            ]
        );

        
$this->add_control(
            
'lightbox_slider_icons_size',
            [
                
'label' => esc_html__'Navigation Icons Size''elementor' ),
                
'type' => Controls_Manager::SLIDER,
                
'size_units' => [ 'px''em''rem''vw''custom' ],
                
'selectors' => [
                    
'.elementor-lightbox' => '--lightbox-navigation-icons-size: {{SIZE}}{{UNIT}}',
                ],
                
'separator' => 'before',
            ]
        );

        
$this->end_controls_section();
    }
}