PluginProbe
Borderless – Addons and Templates for Elementor / 1.3.6
Borderless – Addons and Templates for Elementor v1.3.6
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.3.6, at modules/wpbakery/elements/modal.php

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