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