PluginProbe
Borderless – Addons and Templates for Elementor / 1.0.2
Borderless – Addons and Templates for Elementor v1.0.2
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 All 78 releases
borderless / modules / wpbakery / elements / modal.php

modal.php in Borderless – Addons and Templates for Elementor 1.0.2, at modules/wpbakery/elements/modal.php

742 lines 26.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( '-1' );
4 }
5
6 /*-----------------------------------------------------------------------------------*/
7 /* Modal
8 /*-----------------------------------------------------------------------------------*/
9
10 class WPBakeryShortCode_borderless_wpbakery_modal extends WPBakeryShortCodesContainer {
11 protected function content( $atts, $content = null ) {
12 extract( shortcode_atts( array(
13 'trigger' => 'trigger-button',
14 'title' => 'Title',
15 'title_tag' => 'span',
16 'text_color' => '',
17 'alignment' => 'trigger-left',
18 'initial_height' => '',
19 'button_shape' => 'borderless-rounded',
20 'button_outline_shape' => '',
21 'button_color' => '',
22 'button_title_color' => '',
23 'button_background_color' => '',
24 'button_outline_color' => '',
25 'button_size' => 'button-size-small',
26 'icon_display' => '',
27 'custom_image_icon' => '',
28 'custom_svg_icon' => '',
29 'icon' => '',
30 'icon_color' => '',
31 'custom_icon_color' => '',
32 'shape' => '',
33 'color_shape' => '',
34 'icon_size' => '',
35 'icon_spacing' => '',
36 'icon_gap' => '0',
37 'height' => 'auto',
38 'width' => '100px',
39 'animations' => '',
40 'animation_delay' => '',
41 'animation_speed' => 'slower animated infinite',
42 //Static
43 'el_id' => '',
44 'el_class' => '',
45 'css' => '',
46 'css_animation' => ''
47 ), $atts ) );
48 $output = '';
49
50 // Retrieve data from the database.
51 $options = get_option( 'borderless' );
52
53
54 // Set default values
55 $borderless_primary_color = isset( $options['primary_color'] ) ? $options['primary_color'] : '#3379fc'; //Primary Color
56 $borderless_secondary_color = isset( $options['secondary_color'] ) ? $options['secondary_color'] : '#3379fc'; //Secondary Color
57 $borderless_text_color = isset( $options['text_color'] ) ? $options['text_color'] : ''; //Text Color
58 $borderless_accent_color = isset( $options['accent_color'] ) ? $options['accent_color'] : '#3379fc'; //Accent Color
59
60 // Start Default Extra Class, CSS and CSS animation
61
62 $css = isset( $atts['css'] ) ? $atts['css'] : '';
63 $el_id = isset( $atts['el_id'] ) ? 'id="' . esc_attr( $el_id ) . '"' : '';
64 $el_class = isset( $atts['el_class'] ) ? $atts['el_class'] : '';
65
66 if ( '' !== $css_animation ) {
67 wp_enqueue_script( 'waypoints' );
68 $css_animation_style = ' wpb_animate_when_almost_visible wpb_' . $css_animation;
69 }
70
71 $class_to_filter = vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
72 $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
73
74 $uniqid = md5(uniqid(rand(), true));
75 $uniqid = preg_replace('/[0-9]+/', '', $uniqid);
76
77 // End Default Extra Class, CSS and CSS animation
78
79 // Start Trigger Mode
80
81 $output .= '<div class="borderless-wpbakery-modal-trigger '.$alignment.'">';
82
83 if ($trigger == 'trigger-button') {
84
85 if (!empty($button_color)) {
86
87 // Button Background Color
88
89 $button_background_color = isset( $button_background_color ) ? 'background-color: '.$button_background_color.';' : 'background-color: '.$borderless_primary_color.';';
90
91 // Text Color
92
93 if (!empty($button_title_color)) {
94 $button_title_color = 'color: '.$button_title_color.';';
95 } else {
96 $button_title_color = '';
97 }
98
99 // Border Color
100
101 if (!empty($button_outline_color)) {
102 $button_outline_color = 'border-color: '.$button_outline_color.';';
103 } else {
104 $button_outline_color = '';
105 }
106
107 } else {
108 $button_title_color = '';
109 $button_background_color = '';
110 $button_outline_color = '';
111 }
112
113
114 $output .= '<div style="'.$button_background_color .' '.$button_title_color.' '.$button_outline_color.'" class="borderless-wpbakery-modal-button '.$button_size.' '.$trigger.' '.$button_shape.' '.$button_outline_shape.'" data-modal="'.$uniqid.'">'.$title.'</div>';
115 } else if ($trigger == 'trigger-image') {
116
117 // Image
118
119 if ($icon_display == 'image_icon') {
120
121 $default_src = vc_asset_url( 'vc/no_image.png' );
122 $img = wp_get_attachment_image_src( $custom_image_icon );
123 $src = $img[0];
124 $custom_src = $src ? esc_attr( $src ) : $default_src;
125
126 $icon_content = '<img src="'.$custom_src.'" >';
127
128 } elseif ($icon_display == 'svg_icon') {
129
130 $default_src = vc_asset_url( 'vc/no_image.png' );
131 $img = wp_get_attachment_image_src( $custom_svg_icon );
132 $src = $img[0];
133 $custom_src = $src ? esc_attr( $src ) : $default_src;
134
135 $icon_content = '<div class="borderless-wpbakery-modal-svg" style="height:'.$height.';width:'.$width.';"><img class="borderless-svg-img" src="'.$custom_src.'" ></div>';
136
137 } else {
138
139 $iconClass = isset( $icon ) ? esc_attr( $icon ) : 'fa fa-adjust';
140
141 $custom_icon_color = $icon_color ? 'color:'.$custom_icon_color.';' : 'color:'.$borderless_primary_color.';'; //Icon Color
142
143 $font_size_reference = $icon_size;
144
145 if($icon_size != '') {
146 $icon_size = 'font-size:'.$icon_size.';';
147 }
148
149 if($shape != '') {
150
151 if($shape == 'rounded' || $shape == 'square' || $shape == 'round') {
152 $color_shape = $color_shape ? 'background-color:'.$color_shape.';' : 'background-color:'.$borderless_primary_color.';'; //Background Color Shape
153 } else {
154 $color_shape = $color_shape ? 'border-color:'.$color_shape.';' : 'border-color:'.$borderless_primary_color.';'; //Border Color Shape
155 }
156
157 if($icon_spacing != '') {
158 $icon_spacing = 'height:'.$icon_spacing.'; width:'.$icon_spacing.';';
159 } else {
160 $icon_spacing = 'height:calc('.$font_size_reference.' + 2em); width:calc('.$font_size_reference.' + 2em);';
161 }
162
163 $shape_render_start = '<div class="borderless-wpbakery-modal-icon-inner '.$shape.'" style="'.$color_shape.''.$icon_spacing.'">';
164 $shape_render_finish = '</div>';
165
166 } else {
167 $shape_render_start = $shape_render_finish = '';
168 }
169
170 $icon_content = ''.$shape_render_start.'<span style="'.$custom_icon_color.' '.$icon_size.'" class="borderless-wpbakery-modal-image '.$iconClass.'"></span>'.$shape_render_finish.'';
171 }
172
173 $output .= '<div data-modal="'.$uniqid.'" class="borderless-wpbakery-modal-icon '.$animations.' '.$animation_delay.' '.$animation_speed.'" '.$icon_gap.'>';
174 $output .= $icon_content;
175 $output .= '</div>';
176
177 } else if ($trigger == 'trigger-text') {
178
179 // Title Color
180
181 if (!empty($text_color)) {
182 $text_color = 'color: '.$text_color.';';
183 } else {
184 $text_color = '';
185 }
186
187 $output .= '<'.$title_tag.' style="'.$text_color .'" class="borderless-wpbakery-modal-text" data-modal="'.$uniqid.'">'.$title.'</'.$title_tag.'>';
188 }
189
190 $output .= '</div>';
191
192 // End Trigger Mode
193
194 // Start Modal Height
195
196 if (!empty($initial_height)) {
197 $initial_height = 'style="height:'.$initial_height.';"';
198 }
199
200 // End Modal Height
201
202 $output .= '<div id="'.$uniqid.'" class="borderless-wpbakery-modal">';
203 $output .= '<div id="'.$uniqid.'" class="borderless-wpbakery-modal-inner' .$css_class.'">';
204 $output .= '<a class="borderless-wpbakery-modal-close">&times;</a>';
205 $output .= '<div id="'.$el_id.'" '.$initial_height.' class="borderless-wpbakery-modal-content">'.wpb_js_remove_wpautop($content).'</div>';
206 $output .= '</div>';
207 $output .= '</div>';
208
209 return $output;
210 }
211 }
212
213
214 vc_map( array(
215 'name' => __( 'Modal', 'borderless' ),
216 'base' => 'borderless_wpbakery_modal',
217 'icon' => plugins_url('../images/modal.png', __FILE__),
218 "content_element" => true,
219 "show_settings_on_create" => false,
220 "is_container" => true,
221 'category' => __( 'Borderless', 'borderless' ),
222 'description' => __( 'Add and manage multiple icons', 'borderless' ),
223 'params' => array(
224
225 array(
226 'type' => 'dropdown',
227 'heading' => __( 'Start From', 'borderless' ),
228 'param_name' => 'trigger',
229 'value' => array(
230 __( 'Button', 'borderless' ) => 'trigger-button',
231 __( 'Image', 'borderless' ) => 'trigger-image',
232 __( 'Text', 'borderless' ) => 'trigger-text',
233 ),
234 'description' => __( 'Select start mode.', 'borderless' ),
235 ),
236
237 array(
238 'type' => 'textfield',
239 'heading' => __( 'Title', 'borderless' ),
240 'param_name' => 'title',
241 'description' => __( 'Enter Title.', 'borderless' ),
242 'dependency' => array(
243 'element' => 'trigger',
244 'value' => array( 'trigger-button','trigger-text' ),
245 ),
246 ),
247
248 array(
249 'type' => 'dropdown',
250 'heading' => __( 'Title Tag', 'borderless' ),
251 'param_name' => 'title_tag',
252 'value' => array(
253 __( 'span', 'borderless' ) => 'span',
254 __( 'h1', 'borderless' ) => 'h1',
255 __( 'h2', 'borderless' ) => 'h2',
256 __( 'h3', 'borderless' ) => 'h3',
257 __( 'h4', 'borderless' ) => 'h4',
258 __( 'h5', 'borderless' ) => 'h5',
259 __( 'h6', 'borderless' ) => 'h6',
260 __( 'p', 'borderless' ) => 'p',
261 __( 'div', 'borderless' ) => 'div',
262 ),
263 'description' => __( 'Select element tag.', 'borderless' ),
264 'dependency' => array(
265 'element' => 'trigger',
266 'value' => array( 'trigger-text' ),
267 ),
268 ),
269
270 array(
271 'type' => 'colorpicker',
272 'heading' => __( 'Title Color', 'borderless' ),
273 'param_name' => 'text_color',
274 'description' => __( 'Select custom title color.', 'borderless' ),
275 'dependency' => array(
276 'element' => 'trigger',
277 'value' => array( 'trigger-text' ),
278 ),
279 ),
280
281 array(
282 'type' => 'dropdown',
283 'heading' => __( 'Alignment', 'borderless' ),
284 'param_name' => 'alignment',
285 'value' => array(
286 __( 'Left', 'borderless' ) => 'trigger-left',
287 __( 'Right', 'borderless' ) => 'trigger-right',
288 __( 'Center', 'borderless' ) => 'trigger-center',
289 ),
290 'description' => __( 'Select alignment.', 'borderless' ),
291 ),
292
293 array(
294 'type' => 'dropdown',
295 'heading' => __( 'Initial Height', 'borderless' ),
296 'param_name' => 'initial_height',
297 'value' => array(
298 __( 'None', 'borderless' ) => '',
299 __( '5', 'borderless' ) => '5vh',
300 __( '10', 'borderless' ) => '10vh',
301 __( '15', 'borderless' ) => '15vh',
302 __( '20', 'borderless' ) => '20vh',
303 __( '25', 'borderless' ) => '25vh',
304 __( '30', 'borderless' ) => '30vh',
305 __( '35', 'borderless' ) => '35vh',
306 __( '40', 'borderless' ) => '40vh',
307 __( '45', 'borderless' ) => '45vh',
308 __( '50', 'borderless' ) => '50vh',
309 ),
310 'description' => __( 'Select the initial height for modal.', 'borderless' ),
311 ),
312
313 /*
314 * Button Tab
315 */
316
317 array(
318 'type' => 'dropdown',
319 'heading' => __( 'Shape', 'borderless' ),
320 'description' => __( 'Select shape.', 'borderless' ),
321 'param_name' => 'button_shape',
322 'value' => array(
323 __( 'Rounded', 'borderless' ) => 'borderless-rounded',
324 __( 'Square', 'borderless' ) => 'borderless-square',
325 __( 'Round', 'borderless' ) => 'borderless-round',
326 ),
327 'dependency' => array(
328 'element' => 'trigger',
329 'value' => array( 'trigger-button' ),
330 ),
331 'group' => 'Button',
332 ),
333
334 array(
335 'type' => 'dropdown',
336 'heading' => __( 'Outline Shape', 'borderless' ),
337 'description' => __( 'Select outilne shape.', 'borderless' ),
338 'param_name' => 'button_outline_shape',
339 'value' => array(
340 __( 'None', 'borderless' ) => '',
341 __( 'Outline', 'borderless' ) => 'borderless-outline',
342 __( 'Outline 2x', 'borderless' ) => 'borderless-outline-2',
343 __( 'Outline 3x', 'borderless' ) => 'borderless-outline-3',
344 __( 'Outline 4x', 'borderless' ) => 'borderless-outline-4',
345 __( 'Outline 5x', 'borderless' ) => 'borderless-outline-5',
346 ),
347 'dependency' => array(
348 'element' => 'trigger',
349 'value' => array( 'trigger-button' ),
350 ),
351 'group' => 'Button',
352 ),
353
354 array(
355 'type' => 'dropdown',
356 'heading' => __( 'Button Color', 'borderless' ),
357 'param_name' => 'button_color',
358 'value' => array(
359 __( 'Preset Color', 'borderless' ) => '',
360 __( 'Custom Color', 'borderless' ) => 'custom',
361 ),
362 'description' => __( 'Select icon color.', 'borderless' ),
363 'dependency' => array(
364 'element' => 'trigger',
365 'value' => array( 'trigger-button' ),
366 ),
367 'group' => 'Button',
368 ),
369
370 array(
371 'type' => 'colorpicker',
372 'heading' => __( 'Title Color', 'borderless' ),
373 'param_name' => 'button_title_color',
374 'description' => __( 'Select color.', 'borderless' ),
375 'group' => 'Button',
376 'dependency' => array(
377 'element' => 'button_color',
378 'value' => array( 'custom' ),
379 ),
380 ),
381
382 array(
383 'type' => 'colorpicker',
384 'heading' => __( 'Background Color', 'borderless' ),
385 'param_name' => 'button_background_color',
386 'description' => __( 'Select color.', 'borderless' ),
387 'group' => 'Button',
388 'dependency' => array(
389 'element' => 'button_color',
390 'value' => array( 'custom' ),
391 ),
392 ),
393
394 array(
395 'type' => 'colorpicker',
396 'heading' => __( 'Outline Color', 'borderless' ),
397 'param_name' => 'button_outline_color',
398 'description' => __( 'Select color.', 'borderless' ),
399 'group' => 'Button',
400 'dependency' => array(
401 'element' => 'button_color',
402 'value' => array( 'custom' ),
403 ),
404 ),
405
406 array(
407 'type' => 'dropdown',
408 'heading' => __( 'Size', 'borderless' ),
409 'description' => __( 'Select button size.', 'borderless' ),
410 'param_name' => 'button_size',
411 'value' => array(
412 __( 'Small', 'borderless' ) => 'button-size-small',
413 __( 'Normal', 'borderless' ) => 'button-size-normal',
414 __( 'Large', 'borderless' ) => 'button-size-large',
415 __( 'Block', 'borderless' ) => 'button-size-block',
416 ),
417 'dependency' => array(
418 'element' => 'trigger',
419 'value' => array( 'trigger-button' ),
420 ),
421 'group' => 'Button',
422 ),
423
424 /*
425 * Icon Tab
426 */
427
428 array(
429 'type' => 'dropdown',
430 'heading' => __( 'Icon to display', 'borderless' ),
431 'param_name' => 'icon_display',
432 'value' => array(
433 __( 'Icon Manager', 'borderless' ) => 'icon_manager',
434 __( 'Image Icon', 'borderless' ) => 'image_icon',
435 __( 'SVG Icon', 'borderless' ) => 'svg_icon',
436 ),
437 'description' => __( 'Enable Icon Library.', 'borderless' ),
438 'dependency' => array(
439 'element' => 'trigger',
440 'value' => array( 'trigger-image' ),
441 ),
442 'group' => 'Image',
443 ),
444
445 array(
446 'type' => 'attach_image',
447 'heading' => __( 'Upload Image Icon', 'borderless' ),
448 'param_name' => 'custom_image_icon',
449 'description' => __( 'Upload the custom image icon.', 'borderless' ),
450 'group' => 'Image',
451 'dependency' => array(
452 'element' => 'icon_display',
453 'value' => array( 'image_icon' ),
454 ),
455 ),
456
457 array(
458 'type' => 'attach_image',
459 'heading' => __( 'Upload SVG Icon', 'borderless' ),
460 'param_name' => 'custom_svg_icon',
461 'description' => __( 'Upload the custom svg icon.', 'borderless' ),
462 'group' => 'Image',
463 'dependency' => array(
464 'element' => 'icon_display',
465 'value' => array( 'svg_icon' ),
466 ),
467 ),
468
469 array(
470 'type' => 'iconmanager',
471 'heading' => __( 'Icon', 'borderless' ),
472 'param_name' => 'icon',
473 'description' => __( 'Select icon from library.', 'borderless' ),
474 'group' => 'Image',
475 'dependency' => array(
476 'element' => 'icon_display',
477 'value' => array( 'icon_manager' ),
478 ),
479 ),
480
481 array(
482 'type' => 'dropdown',
483 'heading' => __( 'Icon color', 'borderless' ),
484 'param_name' => 'icon_color',
485 'value' => array(
486 __( 'Preset Color', 'borderless' ) => '',
487 __( 'Custom Color', 'borderless' ) => 'custom',
488 ),
489 'description' => __( 'Select icon color.', 'borderless' ),
490 'dependency' => array(
491 'element' => 'icon_display',
492 'value' => array( 'icon_manager' ),
493 ),
494 'group' => 'Image',
495 ),
496 array(
497 'type' => 'colorpicker',
498 'heading' => __( 'Custom Icon Color', 'borderless' ),
499 'param_name' => 'custom_icon_color',
500 'description' => __( 'Select custom icon color.', 'borderless' ),
501 'group' => 'Image',
502 'dependency' => array(
503 'element' => 'icon_color',
504 'value' => array( 'custom' ),
505 ),
506 ),
507 array(
508 'type' => 'dropdown',
509 'heading' => __( 'Shape', 'borderless' ),
510 'description' => __( 'Select icon shape.', 'borderless' ),
511 'param_name' => 'shape',
512 'group' => 'Image',
513 'dependency' => array(
514 'element' => 'icon_display',
515 'value' => array( 'icon_manager' ),
516 ),
517 'value' => array(
518 __( 'None', 'borderless' ) => '',
519 __( 'Rounded', 'borderless' ) => 'rounded',
520 __( 'Square', 'borderless' ) => 'square',
521 __( 'Round', 'borderless' ) => 'round',
522 __( 'Outline Rounded', 'borderless' ) => 'outline-rounded',
523 __( 'Outline Square', 'borderless' ) => 'outline-square',
524 __( 'Outline Round', 'borderless' ) => 'outline-round',
525 ),
526 ),
527 array(
528 'type' => 'colorpicker',
529 'heading' => __( 'Color Shape', 'borderless' ),
530 'param_name' => 'color_shape',
531 'description' => __( 'Select custom shape background color.', 'borderless' ),
532 'group' => 'Image',
533 'dependency' => array(
534 'element' => 'shape',
535 'value' => array( 'rounded','square','round','outline-rounded','outline-square','outline-round', ),
536 ),
537 ),
538 array(
539 'type' => 'textfield',
540 'heading' => __( 'Size', 'borderless' ),
541 'param_name' => 'icon_size',
542 'description' => __( 'Icon size. Default value is 16px.', 'borderless' ),
543 'dependency' => array(
544 'element' => 'icon_display',
545 'value' => array( 'icon_manager' ),
546 ),
547 'group' => 'Image',
548 ),
549 array(
550 'type' => 'textfield',
551 'heading' => __( 'Spacing', 'borderless' ),
552 'param_name' => 'icon_spacing',
553 'description' => __( 'Select icon spacing. e.g. 16px.', 'borderless' ),
554 'dependency' => array(
555 'element' => 'icon_display',
556 'value' => array( 'icon_manager' ),
557 ),
558 'group' => 'Image',
559 ),
560 array(
561 'type' => 'textfield',
562 'heading' => __( 'Height', 'borderless' ),
563 'param_name' => 'height',
564 'description' => __( 'Insert the SVG height.', 'borderless' ),
565 'dependency' => array(
566 'element' => 'icon_display',
567 'value' => array( 'svg_icon' ),
568 ),
569 'group' => 'Image',
570 ),
571 array(
572 'type' => 'textfield',
573 'heading' => __( 'Width', 'borderless' ),
574 'param_name' => 'width',
575 'description' => __( 'Insert the SVG width.', 'borderless' ),
576 'dependency' => array(
577 'element' => 'icon_display',
578 'value' => array( 'svg_icon' ),
579 ),
580 'group' => 'Image',
581 ),
582
583
584 array(
585 'type' => 'dropdown',
586 'heading' => __( 'Animations', 'borderless' ),
587 'param_name' => 'animations',
588 'dependency' => array(
589 'element' => 'icon_display',
590 'value' => array( 'icon_manager', 'image_icon', 'svg_icon' ),
591 ),
592 'value' => array(
593 __( 'No Animation', 'borderless' ) => '',
594 __( 'Bounce', 'borderless' ) => 'bounce',
595 __( 'Flash', 'borderless' ) => 'flash',
596 __( 'Pulse', 'borderless' ) => 'pulse',
597 __( 'Rubber Band', 'borderless' ) => 'rubberBand',
598 __( 'Shake', 'borderless' ) => 'shake',
599 __( 'Head Shake', 'borderless' ) => 'headShake',
600 __( 'Swing', 'borderless' ) => 'swing',
601 __( 'Tada', 'borderless' ) => 'tada',
602 __( 'Wobble', 'borderless' ) => 'wobble',
603 __( 'Jello', 'borderless' ) => 'jello',
604 __( 'Bounce In', 'borderless' ) => 'bounceIn',
605 __( 'Bounce In Down', 'borderless' ) => 'bounceInDown',
606 __( 'Bounce In Left', 'borderless' ) => 'bounceInLeft',
607 __( 'Bounce In Right', 'borderless' ) => 'bounceInRight',
608 __( 'Bounce In Up', 'borderless' ) => 'bounceInUp',
609 __( 'Bounce Out', 'borderless' ) => 'bounceOut',
610 __( 'Bounce Out Down', 'borderless' ) => 'bounceOutDown',
611 __( 'Bounce Out Left', 'borderless' ) => 'bounceOutLeft',
612 __( 'Bounce Out Right', 'borderless' ) => 'bounceOutRight',
613 __( 'Bounce Out Up', 'borderless' ) => 'bounceOutUp',
614 __( 'Fade In', 'borderless' ) => 'fadeIn',
615 __( 'Fade In Down', 'borderless' ) => 'fadeInDown',
616 __( 'Fade In Down Big', 'borderless' ) => 'fadeInDownBig',
617 __( 'Fade In Left', 'borderless' ) => 'fadeInLeft',
618 __( 'Fade In Left Big', 'borderless' ) => 'fadeInLeftBig',
619 __( 'Fade In Right', 'borderless' ) => 'fadeInRight',
620 __( 'Fade In Right Big', 'borderless' ) => 'fadeInRightBig',
621 __( 'Fade In Up', 'borderless' ) => 'fadeInUp',
622 __( 'Fade In Up Big', 'borderless' ) => 'fadeInUpBig',
623 __( 'Fade Out', 'borderless' ) => 'fadeOut',
624 __( 'Fade Out Down', 'borderless' ) => 'fadeOutDown',
625 __( 'Fade Out Down Big', 'borderless' ) => 'fadeOutDownBig',
626 __( 'Fade Out Left', 'borderless' ) => 'fadeOutLeft',
627 __( 'Fade Out Left Big', 'borderless' ) => 'fadeOutLeftBig',
628 __( 'Fade Out Right', 'borderless' ) => 'fadeOutRight',
629 __( 'Fade Out Right Big', 'borderless' ) => 'fadeOutRightBig',
630 __( 'Fade Out Up', 'borderless' ) => 'fadeOutUp',
631 __( 'Fade Out Up Big', 'borderless' ) => 'fadeOutUpBig',
632 __( 'Flip In X', 'borderless' ) => 'flipInX',
633 __( 'Flip In Y', 'borderless' ) => 'flipInY',
634 __( 'Flip Out X', 'borderless' ) => 'flipOutX',
635 __( 'Flip Out Y', 'borderless' ) => 'flipOutY',
636 __( 'Light Speed In', 'borderless' ) => 'lightSpeedIn',
637 __( 'Light Speed Out', 'borderless' ) => 'lightSpeedOut',
638 __( 'Rotate In', 'borderless' ) => 'rotateIn',
639 __( 'Rotate In Down Left', 'borderless' ) => 'rotateInDownLeft',
640 __( 'Rotate In Down Right', 'borderless' ) => 'rotateInDownRight',
641 __( 'Rotate In Up Left', 'borderless' ) => 'rotateInUpLeft',
642 __( 'Rotate In Up Right', 'borderless' ) => 'rotateInUpRight',
643 __( 'Rotate Out', 'borderless' ) => 'rotateOut',
644 __( 'Rotate Out Down Left', 'borderless' ) => 'rotateOutDownLeft',
645 __( 'Rotate Out Down Right', 'borderless' ) => 'rotateOutDownRight',
646 __( 'Rotate Out Up Left', 'borderless' ) => 'rotateOutUpLeft',
647 __( 'Rotate Out Up Right', 'borderless' ) => 'rotateOutUpRight',
648 __( 'Hinge', 'borderless' ) => 'hinge',
649 __( 'Jack In The Box', 'borderless' ) => 'jackInTheBox',
650 __( 'Roll In', 'borderless' ) => 'rollIn',
651 __( 'Roll Out', 'borderless' ) => 'rollOut',
652 __( 'Zoom In', 'borderless' ) => 'zoomIn',
653 __( 'Zoom In Down', 'borderless' ) => 'zoomInDown',
654 __( 'Zoom In Left', 'borderless' ) => 'zoomInLeft',
655 __( 'Zoom In Right', 'borderless' ) => 'zoomInRight',
656 __( 'Zoom In Up', 'borderless' ) => 'zoomInUp',
657 __( 'Zoom Out', 'borderless' ) => 'zoomOut',
658 __( 'Zoom Out Down', 'borderless' ) => 'zoomOutDown',
659 __( 'Zoom Out Left', 'borderless' ) => 'zoomOutLeft',
660 __( 'Zoom Out Right', 'borderless' ) => 'zoomOutRight',
661 __( 'Zoom Out Up', 'borderless' ) => 'zoomOutUp',
662 __( 'Slide In Down', 'borderless' ) => 'slideInDown',
663 __( 'Slide In Left', 'borderless' ) => 'slideInLeft',
664 __( 'Slide In Right', 'borderless' ) => 'slideInRight',
665 __( 'Slide In Up', 'borderless' ) => 'slideInUp',
666 __( 'Slide Out Down', 'borderless' ) => 'slideOutDown',
667 __( 'Slide Out Left', 'borderless' ) => 'slideOutLeft',
668 __( 'Slide Out Right', 'borderless' ) => 'slideOutRight',
669 __( 'Slide Out Up', 'borderless' ) => 'slideOutUp',
670 __( 'Heart Beat', 'borderless' ) => 'heartBeat',
671
672 ),
673 'description' => __( 'Select the type of animation you want on hover.', 'borderless' ),
674 'group' => 'Image',
675 ),
676
677 array(
678 'type' => 'dropdown',
679 'heading' => __( 'Animation Delay', 'borderless' ),
680 'param_name' => 'animation_delay',
681 'value' => array(
682 __( 'No Delay', 'borderless' ) => '',
683 __( 'Delay 1 second', 'borderless' ) => 'delay-1s',
684 __( 'Delay 2 seconds', 'borderless' ) => 'delay-2s',
685 __( 'Delay 3 seconds', 'borderless' ) => 'delay-3s',
686 __( 'Delay 4 seconds', 'borderless' ) => 'delay-4s',
687 __( 'Delay 5 seconds', 'borderless' ) => 'delay-5s',
688
689 ),
690 'dependency' => array(
691 'element' => 'animations',
692 'value' => array( 'bounce','flash','pulse','rubberBand','shake','headShake','swing','tada','wobble','jello','bounceIn','bounceInDown','bounceInLeft','bounceInRight','bounceInUp','bounceOut','bounceOutDown','bounceOutLeft','bounceOutRight','bounceOutUp','fadeIn','fadeInDown','fadeInDownBig','fadeInLeft','fadeInLeftBig','fadeInRight','fadeInRightBig','fadeInUp','fadeInUpBig','fadeOut','fadeOutDown','fadeOutDownBig','fadeOutLeft','fadeOutLeftBig','fadeOutRight','fadeOutRightBig','fadeOutUp','fadeOutUpBig','flipInX','flipInY','flipOutX','flipOutY','lightSpeedIn','lightSpeedOut','rotateIn','rotateInDownLeft','rotateInDownRight','rotateInUpLeft','rotateInUpRight','rotateOut','rotateOutDownLeft','rotateOutDownRight','rotateOutUpLeft','rotateOutUpRight','hinge','jackInTheBox','rollIn','rollOut','zoomIn','zoomInDown','zoomInLeft','zoomInRight','zoomInUp','zoomOut','zoomOutDown','zoomOutLeft','zoomOutRight','zoomOutUp','slideInDown','slideInLeft','slideInRight','slideInUp','slideOutDown','slideOutLeft','slideOutRight','slideOutUp','heartBeat' ),
693 ),
694 'description' => __( 'Select delay for animation.', 'borderless' ),
695 'group' => 'Image',
696 ),
697
698 array(
699 'type' => 'dropdown',
700 'heading' => __( 'Animation Speed', 'borderless' ),
701 'param_name' => 'animation_speed',
702 'value' => array(
703 __( 'Slower - 3s', 'borderless' ) => 'slower animated infinite',
704 __( 'Slow - 2s', 'borderless' ) => 'slow animated infinite',
705 __( 'Fast - 800ms', 'borderless' ) => 'fast animated infinite',
706 __( 'Faster - 500ms', 'borderless' ) => 'faster animated infinite',
707
708 ),
709 'dependency' => array(
710 'element' => 'animations',
711 'value' => array( 'bounce','flash','pulse','rubberBand','shake','headShake','swing','tada','wobble','jello','bounceIn','bounceInDown','bounceInLeft','bounceInRight','bounceInUp','bounceOut','bounceOutDown','bounceOutLeft','bounceOutRight','bounceOutUp','fadeIn','fadeInDown','fadeInDownBig','fadeInLeft','fadeInLeftBig','fadeInRight','fadeInRightBig','fadeInUp','fadeInUpBig','fadeOut','fadeOutDown','fadeOutDownBig','fadeOutLeft','fadeOutLeftBig','fadeOutRight','fadeOutRightBig','fadeOutUp','fadeOutUpBig','flipInX','flipInY','flipOutX','flipOutY','lightSpeedIn','lightSpeedOut','rotateIn','rotateInDownLeft','rotateInDownRight','rotateInUpLeft','rotateInUpRight','rotateOut','rotateOutDownLeft','rotateOutDownRight','rotateOutUpLeft','rotateOutUpRight','hinge','jackInTheBox','rollIn','rollOut','zoomIn','zoomInDown','zoomInLeft','zoomInRight','zoomInUp','zoomOut','zoomOutDown','zoomOutLeft','zoomOutRight','zoomOutUp','slideInDown','slideInLeft','slideInRight','slideInUp','slideOutDown','slideOutLeft','slideOutRight','slideOutUp','heartBeat' ),
712 ),
713 'description' => __( 'Select Speed for animation.', 'borderless' ),
714 'group' => 'Image',
715 ),
716
717 // Animation
718 vc_map_add_css_animation(),
719
720 array(
721 'type' => 'el_id',
722 'heading' => __( 'Element ID', 'borderless' ),
723 'param_name' => 'el_id',
724 'description' => sprintf( __( 'Enter element ID (Note: make sure it is unique and valid according to %sw3c specification%s).', 'borderless' ), '<a href="https://www.w3schools.com/tags/att_global_id.asp" target="_blank">', '</a>' ),
725 ),
726
727 array(
728 'type' => 'textfield',
729 'heading' => __( 'Extra class name', 'borderless' ),
730 'param_name' => 'el_class',
731 'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'borderless' ),
732 ),
733
734 array(
735 'type' => 'css_editor',
736 'heading' => __( 'CSS box', 'borderless' ),
737 'param_name' => 'css',
738 'group' => __( 'Design Options', 'borderless' ),
739 ),
740 ),
741 "js_view" => 'VcColumnView'
742 ) );