PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.13
Shortcodes and extra features for Phlox theme v2.5.13
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / divider.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 6 years ago accordion.php 6 years ago audio.php 6 years ago before-after.php 6 years ago button.php 6 years ago carousel-navigation.php 6 years ago contact-box.php 6 years ago contact-form.php 6 years ago custom-list.php 6 years ago divider.php 6 years ago gallery.php 6 years ago gmap.php 6 years ago heading-modern.php 6 years ago icon.php 6 years ago image.php 6 years ago mailchimp.php 6 years ago modern-button.php 6 years ago quote.php 6 years ago recent-comments.php 6 years ago recent-posts-grid-carousel.php 6 years ago recent-posts-land-style.php 6 years ago recent-posts-masonry.php 6 years ago recent-posts-tiles-carousel.php 6 years ago recent-posts-tiles.php 6 years ago recent-posts-timeline.php 6 years ago recent-products.php 6 years ago responsive-table.php 6 years ago search.php 6 years ago staff.php 6 years ago svg.php 6 years ago tabs.php 6 years ago testimonial.php 6 years ago text.php 6 years ago touch-slider.php 6 years ago video.php 6 years ago
divider.php
435 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12
13 /**
14 * Elementor 'Divider' widget.
15 *
16 * Elementor widget that displays an 'Divider' with lightbox.
17 *
18 * @since 1.0.0
19 */
20 class Divider extends Widget_Base {
21
22 /**
23 * Get widget name.
24 *
25 * Retrieve 'Divider' widget name.
26 *
27 * @since 1.0.0
28 * @access public
29 *
30 * @return string Widget name.
31 */
32 public function get_name() {
33 return 'aux_divider';
34 }
35
36 /**
37 * Get widget title.
38 *
39 * Retrieve 'Divider' widget title.
40 *
41 * @since 1.0.0
42 * @access public
43 *
44 * @return string Widget title.
45 */
46 public function get_title() {
47 return __('Divider', 'auxin-elements' );
48 }
49
50 /**
51 * Get widget icon.
52 *
53 * Retrieve 'Divider' widget icon.
54 *
55 * @since 1.0.0
56 * @access public
57 *
58 * @return string Widget icon.
59 */
60 public function get_icon() {
61 return 'eicon-divider auxin-badge';
62 }
63
64 /**
65 * Get widget categories.
66 *
67 * Retrieve 'Divider' widget icon.
68 *
69 * @since 1.0.0
70 * @access public
71 *
72 * @return string Widget icon.
73 */
74 public function get_categories() {
75 return array( 'auxin-core' );
76 }
77
78 /**
79 * Register 'Divider' widget controls.
80 *
81 * Adds different input fields to allow the user to change and customize the widget settings.
82 *
83 * @since 1.0.0
84 * @access protected
85 */
86 protected function _register_controls() {
87
88 /*-----------------------------------------------------------------------------------*/
89 /* Divider section
90 /*-----------------------------------------------------------------------------------*/
91
92 $this->start_controls_section(
93 'divider_section',
94 array(
95 'label' => __('Divider', 'auxin-elements' )
96 )
97 );
98
99 $this->add_control(
100 'style',
101 array(
102 'label' => __('Style','auxin-elements' ),
103 'type' => 'aux-visual-select',
104 'style_items' => 'max-width:48%;',
105 'options' => array(
106 'white-space' => array(
107 'label' => __('White Space', 'auxin-elements'),
108 'image' => AUXIN_URL . 'images/visual-select/divider-white-space.svg'
109 ),
110 'solid' => array(
111 'label' => __('Solid', 'auxin-elements'),
112 'image' => AUXIN_URL . 'images/visual-select/divider-solid.svg'
113 ),
114 'dashed' => array(
115 'label' => __('Dashed', 'auxin-elements'),
116 'image' => AUXIN_URL . 'images/visual-select/divider-dashed.svg'
117 ),
118 'circle-symbol' => array(
119 'label' => __('Circle', 'auxin-elements'),
120 'image' => AUXIN_URL . 'images/visual-select/divider-circle.svg'
121 ),
122 'diamond-symbol' => array(
123 'label' => __('Diamond', 'auxin-elements'),
124 'image' => AUXIN_URL . 'images/visual-select/divider-diamond.svg'
125 ),
126 'vertical' => array(
127 'label' => __('Vertical Line', 'auxin-elements'),
128 'image' => AUXIN_URL . 'images/visual-select/divider-diamond.svg'
129 )
130 ),
131 'default' => 'circle-symbol'
132 )
133 );
134
135 $this->add_control(
136 'width',
137 array(
138 'label' => __('Width','auxin-elements'),
139 'description' => __('Specifies the size of divider.', 'auxin-elements'),
140 'label_block' => true,
141 'type' => Controls_Manager::SELECT,
142 'default' => 'medium',
143 'options' => array(
144 'large' => __('Full' , 'auxin-elements'),
145 'medium' => __('Medium', 'auxin-elements'),
146 'small' => __('Small' , 'auxin-elements'),
147 'tiny' => __('Tiny' , 'auxin-elements'),
148 'custom' => __('Custom', 'auxin-elements')
149 ),
150 'return_value' => '',
151 'condition' => array(
152 'style!' => array( 'white-space', 'vertical' )
153 )
154 )
155 );
156
157 $this->add_responsive_control(
158 'custom_width',
159 array(
160 'label' => __( 'Custom width', 'auxin-elements' ),
161 'type' => Controls_Manager::SLIDER,
162 'size_units' => array('px', '%'),
163 'desktop_default' => array(
164 'size' => 100,
165 'unit' => '%'
166 ),
167 'range' => array(
168 'px' => array(
169 'min' => 0,
170 'max' => 1600,
171 'step' => 1
172 ),
173 '%' => array(
174 'min' => 1,
175 'max' => 100,
176 'step' => 1
177 )
178 ),
179 'return_value' => '',
180 'selectors' => array(
181 '{{WRAPPER}} hr[class*="aux-divider"]' => 'width:{{SIZE}}{{UNIT}};'
182 ),
183 'condition' => array(
184 'style!' => array( 'white-space', 'vertical' ),
185 'width' => 'custom'
186 )
187 )
188 );
189
190 $this->add_control(
191 'alignment',
192 array(
193 'label' => __('Alignment', 'auxin-elements'),
194 'type' => Controls_Manager::CHOOSE,
195 'default' => 'center',
196 'options' => array(
197 'left' => array(
198 'title' => __( 'Left', 'auxin-elements' ),
199 'icon' => 'fa fa-align-left',
200 ),
201 'center' => array(
202 'title' => __( 'Center', 'auxin-elements' ),
203 'icon' => 'fa fa-align-center',
204 ),
205 'right' => array(
206 'title' => __( 'Right', 'auxin-elements' ),
207 'icon' => 'fa fa-align-right',
208 )
209 ),
210 'return_value' => '',
211 'conditions' => array(
212 'relation' => 'and',
213 'terms' => array(
214 array(
215 'name' => 'style',
216 'operator' => '!==',
217 'value' => 'white-space'
218 ),
219 array(
220 'name' => 'width',
221 'operator' => '!==',
222 'value' => 'large'
223 )
224 )
225 )
226 )
227 );
228
229 $this->add_control(
230 'symbol_alignment',
231 array(
232 'label' => __('Symbol Alignment', 'auxin-elements'),
233 'type' => Controls_Manager::CHOOSE,
234 'default' => 'center',
235 'options' => array(
236 'left' => array(
237 'title' => __( 'Left', 'auxin-elements' ),
238 'icon' => 'fa fa-align-left',
239 ),
240 'center' => array(
241 'title' => __( 'Center', 'auxin-elements' ),
242 'icon' => 'fa fa-align-center',
243 ),
244 'right' => array(
245 'title' => __( 'Right', 'auxin-elements' ),
246 'icon' => 'fa fa-align-right',
247 )
248 ),
249 'return_value' => '',
250 'condition' => array(
251 'style' => array( 'circle-symbol', 'diamond-symbol' )
252 )
253 )
254 );
255
256 $this->add_responsive_control(
257 'white_space',
258 array(
259 'label' => __( 'Gap', 'auxin-elements' ),
260 'type' => Controls_Manager::SLIDER,
261 'size_units' => array('px','em', 'rem'),
262 'desktop_default' => array(
263 'size' => 3,
264 'unit' => 'em'
265 ),
266 'range' => array(
267 'px' => array(
268 'min' => 0,
269 'max' => 500,
270 'step' => 1
271 ),
272 'em' => array(
273 'min' => 1,
274 'max' => 15,
275 'step' => 0.1
276 ),
277 'rem' => array(
278 'min' => 1,
279 'max' => 15,
280 'step' => 0.1
281 )
282 ),
283 'selectors' => array(
284 '{{WRAPPER}} hr.aux-divider-space' => 'padding-top: {{SIZE}}{{UNIT}}; margin-top:0; margin-bottom:0;'
285 ),
286 'condition' => array(
287 'style' => 'white-space'
288 )
289 )
290 );
291
292 $this->add_responsive_control(
293 'margin_top',
294 array(
295 'label' => __( 'Gap top', 'auxin-elements' ),
296 'type' => Controls_Manager::SLIDER,
297 'size_units' => array('px','em', 'rem'),
298 'desktop_default' => array(
299 'size' => 3,
300 'unit' => 'em'
301 ),
302 'range' => array(
303 'px' => array(
304 'min' => 0,
305 'max' => 500,
306 'step' => 1
307 ),
308 'em' => array(
309 'min' => 1,
310 'max' => 15,
311 'step' => 0.1
312 ),
313 'rem' => array(
314 'min' => 1,
315 'max' => 15,
316 'step' => 0.1
317 )
318 ),
319 'selectors' => array(
320 '{{WRAPPER}} hr[class*="aux-divider"]' => 'margin-top:{{SIZE}}{{UNIT}};'
321 ),
322 'condition' => array(
323 'style!' => 'white-space'
324 )
325 )
326 );
327
328 $this->add_responsive_control(
329 'margin_bottom',
330 array(
331 'label' => __( 'Gap bottom', 'auxin-elements' ),
332 'type' => Controls_Manager::SLIDER,
333 'size_units' => array('px','em', 'rem'),
334 'desktop_default' => array(
335 'size' => 3,
336 'unit' => 'em'
337 ),
338 'range' => array(
339 'px' => array(
340 'min' => 0,
341 'max' => 500,
342 'step' => 1
343 ),
344 'em' => array(
345 'min' => 1,
346 'max' => 15,
347 'step' => 0.1
348 ),
349 'rem' => array(
350 'min' => 1,
351 'max' => 15,
352 'step' => 0.1
353 )
354 ),
355 'selectors' => array(
356 '{{WRAPPER}} hr[class*="aux-divider"]' => 'margin-bottom:{{SIZE}}{{UNIT}};'
357 ),
358 'condition' => array(
359 'style!' => 'white-space'
360 )
361 )
362 );
363
364 $this->end_controls_section();
365
366 /*-----------------------------------------------------------------------------------*/
367 /* Style Tab
368 /*-----------------------------------------------------------------------------------*/
369
370 /* Color Section
371 /*-------------------------------------*/
372
373 $this->start_controls_section(
374 'color_section',
375 array(
376 'label' => __( 'Color', 'auxin-elements' ),
377 'tab' => Controls_Manager::TAB_STYLE,
378 'condition' => array(
379 'style!' => 'white-space'
380 )
381 )
382 );
383
384 $this->add_control(
385 'divider_color',
386 array(
387 'label' => __( 'Divider color', 'auxin-elements' ),
388 'type' => Controls_Manager::COLOR,
389 'selectors' => array(
390 '{{WRAPPER}} hr[class*="aux-divider"]' => 'border-color: {{VALUE}};'
391 ),
392 'return_value' => ''
393 )
394 );
395
396 $this->add_control(
397 'symbol_color',
398 array(
399 'label' => __( 'Symbol color', 'auxin-elements' ),
400 'type' => Controls_Manager::COLOR,
401 'selectors' => array(
402 '{{WRAPPER}} .aux-divider-symbolic-circle:after' => 'border-color: {{VALUE}};',
403 '{{WRAPPER}} .aux-divider-symbolic-square:after' => 'background-color: {{VALUE}};'
404 ),
405 'condition' => array(
406 'style!' => array( 'white-space', 'vertical' )
407 )
408 )
409 );
410
411 $this->end_controls_section();
412 }
413
414 /**
415 * Render 'Divider' widget output on the frontend.
416 *
417 * @access protected
418 */
419 protected function render() {
420
421 $settings = $this->get_settings_for_display();
422
423 $args = array(
424 'width' => $settings['width'],
425 'alignment' => $settings['alignment'],
426 'symbol_alignment' => $settings['symbol_alignment'],
427 'style' => $settings['style']
428 );
429
430 // pass the args through the corresponding shortcode callback
431 echo auxin_widget_divider_callback( $args );
432 }
433
434 }
435