';
$html .= "\n\t" . '
';
} elseif ( 'overlay-show-boxes' == $ult_modal_box_settings['modal_style'] ) {
$html .= "\n" . '
';
$html .= "\n\t" . '
';
} else {
$html .= "\n" . '
';
}
$html .= "\n\t" . '
';
// Close img size.
$img_size_values = '';
$img_background_color = '';
$img_edge_position = '';
$custom_padding_img = '';
if ( '' != $ult_modal_box_settings['img_size'] ) {
$img_size_values = 'width:' . $ult_modal_box_settings['img_size'] . 'px;height:' . $ult_modal_box_settings['img_size'] . 'px;';
}
if ( '' != $ult_modal_box_settings['img_close_background_color'] ) {
if ( '' != $ult_modal_box_settings['img_size'] && $ult_modal_box_settings['img_size'] > 39 && $ult_modal_box_settings['img_size'] < 61 ) {
$custom_padding_img = '15';
} else {
$custom_padding_img = '10';
}
}
if ( '' != $ult_modal_box_settings['img_close_background_color'] ) {
$img_background_color = 'background-color: ' . $ult_modal_box_settings['img_close_background_color'] . ';border-radius: 50%;padding:' . $custom_padding_img . 'px;box-sizing: content-box;';
}
if ( '' != $ult_modal_box_settings['img_size'] && 'popup-edge-top-right' == $ult_modal_box_settings['close_icon_position'] ) {
$img_edge_position = 'top:-' . ( (int)$ult_modal_box_settings['img_size'] / 2 + (int)$custom_padding_img ) . 'px;right:-' . ( (int)$ult_modal_box_settings['img_size'] / 2 + (int)$custom_padding_img ) . 'px;';
}
if ( '' != $ult_modal_box_settings['img_size'] && 'popup-edge-top-left' == $ult_modal_box_settings['close_icon_position'] ) {
$img_edge_position = 'top:-' . ( (int)$ult_modal_box_settings['img_size'] / 2 + (int)$custom_padding_img ) . 'px;left:-' . ( (int)$ult_modal_box_settings['img_size'] / 2 + (int)$custom_padding_img ) . 'px;';
}
if ( 'popup-top-right' == $ult_modal_box_settings['close_icon_position'] || 'popup-top-left' == $ult_modal_box_settings['close_icon_position']
|| 'popup-edge-top-right' == $ult_modal_box_settings['close_icon_position'] || 'popup-edge-top-left' == $ult_modal_box_settings['close_icon_position'] ) {
$html .= "\n\t" . '
';
}
$html .= "\n\t\t" . '
';
if ( '' !== $ult_modal_box_settings['modal_title'] ) {
$html .= "\n\t\t\t" . '';
}
$html .= "\n\t\t\t" . '
';
$html .= "\n\t\t\t" . do_shortcode( $content );
$html .= "\n\t\t\t" . '
';
$html .= "\n\t" . '
';
$html .= "\n\t" . '
';
if ( 'top-right' == $ult_modal_box_settings['close_icon_position'] || 'top-left' == $ult_modal_box_settings['close_icon_position'] ) {
$html .= "\n\t" . '
';
}
$html .= "\n" . '
';
$is_preset = false; // Display settings for Preset.
if ( isset( $_GET['preset'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$is_preset = true;
}
if ( $is_preset ) {
$text = 'array ( ';
foreach ( $atts as $key => $att ) {
$text .= '
\'' . $key . '\' => \'' . $att . '\',';
}
if ( '' != $content ) {
$text .= '
\'content\' => \'' . $content . '\',';
}
$text .= '
)';
$html .= '
';
$html .= $text;
$html .= '
';
}
return $html;
}
/**
* Add modal popup Component.
*
* @method ultimate_modal_init
*/
public function ultimate_modal_init() {
if ( function_exists( 'vc_map' ) ) {
vc_map(
array(
'name' => __( 'Modal Box', 'ultimate_vc' ),
'base' => 'ultimate_modal',
'icon' => 'vc_modal_box',
'class' => 'modal_box',
'category' => 'Ultimate VC Addons',
'description' => __( 'Adds bootstrap modal box in your content', 'ultimate_vc' ),
'controls' => 'full',
'show_settings_on_create' => true,
'params' => array(
array(
'type' => 'dropdown',
'class' => '',
'heading' => __( 'Icon to display:', 'ultimate_vc' ),
'param_name' => 'icon_type',
'value' => array(
__( 'No Icon', 'ultimate_vc' ) => 'none',
__( 'Font Icon Manager', 'ultimate_vc' ) => 'selector',
__( 'Custom Image Icon', 'ultimate_vc' ) => 'custom',
),
'description' => __( 'Use existing font icon or upload a custom image.', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'icon_manager',
'class' => '',
'heading' => __( 'Select Icon ', 'ultimate_vc' ),
'param_name' => 'icon',
'value' => '',
'description' => __( "Click and select icon of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . "
" . __( 'add new here', 'ultimate_vc' ) . '.',
'dependency' => array(
'element' => 'icon_type',
'value' => array( 'selector' ),
),
'group' => 'General',
),
array(
'type' => 'ult_img_single',
'class' => '',
'heading' => __( 'Upload Image Icon:', 'ultimate_vc' ),
'param_name' => 'icon_img',
'value' => '',
'description' => __( 'Upload the custom image icon.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'icon_type',
'value' => array( 'custom' ),
),
'group' => 'General',
),
// Modal Title.
array(
'type' => 'textfield',
'heading' => __( 'Modal Box Title', 'ultimate_vc' ),
'param_name' => 'modal_title',
'admin_label' => true,
'value' => '',
'description' => __( 'Provide the title for modal box.', 'ultimate_vc' ),
'group' => 'General',
),
// Add some description.
array(
'type' => 'textarea_html',
'heading' => __( 'Modal Content', 'ultimate_vc' ),
'param_name' => 'content',
'value' => '',
'description' => __( 'Content that will be displayed in Modal Popup.', 'ultimate_vc' ),
'group' => 'General',
'edit_field_class' => 'ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param',
),
array(
'type' => 'dropdown',
'heading' => __( "What's in Modal Popup?", 'ultimate_vc' ),
'param_name' => 'modal_contain',
'value' => array(
__( 'Miscellaneous Things', 'ultimate_vc' ) => 'ult-html',
__( 'Youtube Video', 'ultimate_vc' ) => 'ult-youtube',
__( 'Vimeo Video', 'ultimate_vc' ) => 'ult-vimeo',
__( 'Hosted Video', 'ultimate_vc' ) => 'ult-video-shortcode',
),
'description' => __(
"Please put the embed code in the content for videos, eg:
http://bsf.io/kuv3-
For hosted video - Add any video with WordPress media uploader or with
[video] shortcode.",
'ultimate_vc'
),
'group' => 'General',
),
array(
'type' => 'dropdown',
'heading' => __( 'Display Modal On -', 'ultimate_vc' ),
'param_name' => 'modal_on',
'value' => array(
__( 'Button', 'ultimate_vc' ) => 'ult-button',
__( 'Image', 'ultimate_vc' ) => 'image',
__( 'Text', 'ultimate_vc' ) => 'text',
__( 'On Page Load', 'ultimate_vc' ) => 'onload',
__( 'Selector', 'ultimate_vc' ) => 'custom-selector',
),
'description' => __( 'When should the popup be initiated?', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'textfield',
'heading' => __( 'Class and/or ID', 'ultimate_vc' ),
'param_name' => 'modal_on_selector',
'description' => __( 'Add .Class and/or #ID to open your modal. Multiple ID or Classes separated by comma', 'ultimate_vc' ),
'value' => '',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'custom-selector' ),
),
'group' => 'General',
),
array(
'type' => 'number',
'heading' => __( 'Delay in Popup Display', 'ultimate_vc' ),
'param_name' => 'onload_delay',
'value' => '2',
'suffix' => 'seconds',
'description' => __( 'Time delay before modal popup on page load (in seconds)', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'onload' ),
),
'group' => 'General',
),
array(
'type' => 'ult_switch',
'heading' => __( 'Hide Modal', 'ultimate_vc' ),
'param_name' => 'ult_hide_modal',
'value' => '',
'options' => array(
'ult_hide_modal_value' => array(
'on' => __( 'Yes', 'ultimate_vc' ),
'off' => __( 'No', 'ultimate_vc' ),
),
),
'edit_field_class' => 'uvc-divider last-uvc-divider vc_column vc_col-sm-12',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'onload' ),
),
'group' => 'General',
),
array(
'type' => 'ult_switch',
'heading' => '
' . __( 'Tablet', 'ultimate_vc' ),
'param_name' => 'ult_hide_modal_tablet',
'value' => '',
'options' => array(
'tablet' => array(
'on' => __( 'Yes', 'ultimate_vc' ),
'off' => __( 'No', 'ultimate_vc' ),
),
),
'group' => 'General',
'dependency' => array(
'element' => 'ult_hide_modal',
'value' => array( 'ult_hide_modal_value' ),
),
'edit_field_class' => 'vc_column vc_col-sm-3',
),
array(
'type' => 'ult_switch',
'heading' => '
' . __( 'Mobile', 'ultimate_vc' ),
'param_name' => 'ult_hide_modal_mobile',
'value' => '',
'options' => array(
'mobile' => array(
'on' => __( 'Yes', 'ultimate_vc' ),
'off' => __( 'No', 'ultimate_vc' ),
),
),
'group' => 'General',
'dependency' => array(
'element' => 'ult_hide_modal',
'value' => array( 'ult_hide_modal_value' ),
),
'edit_field_class' => 'vc_column vc_col-sm-3',
),
array(
'type' => 'ult_img_single',
'heading' => __( 'Upload Image', 'ultimate_vc' ),
'param_name' => 'btn_img',
'admin_label' => true,
'value' => '',
'description' => __( 'Upload the custom image / image banner.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'image' ),
),
'group' => 'General',
),
array(
'type' => 'dropdown',
'heading' => __( 'Button Size', 'ultimate_vc' ),
'param_name' => 'btn_size',
'value' => array(
__( 'Small', 'ultimate_vc' ) => 'sm',
__( 'Medium', 'ultimate_vc' ) => 'md',
__( 'Large', 'ultimate_vc' ) => 'lg',
__( 'Block', 'ultimate_vc' ) => 'block',
),
'description' => __( 'How big the button would you like?', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'General',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Button Background Color', 'ultimate_vc' ),
'param_name' => 'btn_bg_color',
'value' => '#333333',
'group' => 'General',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'General',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Button Background Hover Color', 'ultimate_vc' ),
'param_name' => 'btn_bg_hover_color',
'value' => '',
'group' => 'General',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'General',
),
array(
'type' => 'dropdown',
'heading' => __( 'Alignment', 'ultimate_vc' ),
'param_name' => 'modal_on_align',
'value' => array(
__( 'Center', 'ultimate_vc' ) => 'center',
__( 'Left', 'ultimate_vc' ) => 'left',
__( 'Right', 'ultimate_vc' ) => 'right',
),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button', 'image', 'text' ),
),
'description' => __( 'Selector the alignment of button/text/image', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'textfield',
'heading' => __( 'Text on Button', 'ultimate_vc' ),
'param_name' => 'btn_text',
'admin_label' => true,
'value' => '',
'description' => __( 'Provide the title for this button.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'General',
),
// Custom text for modal trigger.
array(
'type' => 'textfield',
'heading' => __( 'Enter Text', 'ultimate_vc' ),
'param_name' => 'read_text',
'value' => '',
'description' => __( 'Enter the text on which the modal box will be triggered.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'group' => 'General',
),
// Modal box size.
array(
'type' => 'dropdown',
'heading' => __( 'Modal Size', 'ultimate_vc' ),
'param_name' => 'modal_size',
'value' => array(
__( 'Small', 'ultimate_vc' ) => 'small',
__( 'Medium', 'ultimate_vc' ) => 'medium',
__( 'Large', 'ultimate_vc' ) => 'container',
__( 'Block', 'ultimate_vc' ) => 'block',
),
'description' => __( 'How big the modal box would you like?', 'ultimate_vc' ),
'group' => 'General',
),
// Modal Style.
array(
'type' => 'dropdown',
'heading' => __( 'Modal Box Style', 'ultimate_vc' ),
'param_name' => 'modal_style',
'value' => array(
__( 'Corner Bottom Left', 'ultimate_vc' ) => 'overlay-cornerbottomleft',
__( 'Corner Bottom Right', 'ultimate_vc' ) => 'overlay-cornerbottomright',
__( 'Corner Top Left', 'ultimate_vc' ) => 'overlay-cornertopleft',
__( 'Corner Top Right', 'ultimate_vc' ) => 'overlay-cornertopright',
__( 'Corner Shape', 'ultimate_vc' ) => 'overlay-show-cornershape',
__( 'Door Horizontal', 'ultimate_vc' ) => 'overlay-doorhorizontal',
__( 'Door Vertical', 'ultimate_vc' ) => 'overlay-doorvertical',
__( 'Fade', 'ultimate_vc' ) => 'overlay-fade',
__( 'Genie', 'ultimate_vc' ) => 'overlay-show-genie',
__( 'Little Boxes', 'ultimate_vc' ) => 'overlay-show-boxes',
__( 'Simple Genie', 'ultimate_vc' ) => 'overlay-simplegenie',
__( 'Slide Down', 'ultimate_vc' ) => 'overlay-slidedown',
__( 'Slide Up', 'ultimate_vc' ) => 'overlay-slideup',
__( 'Slide Left', 'ultimate_vc' ) => 'overlay-slideleft',
__( 'Slide Right', 'ultimate_vc' ) => 'overlay-slideright',
__( 'Zoom in', 'ultimate_vc' ) => 'overlay-zoomin',
__( 'Zoom out', 'ultimate_vc' ) => 'overlay-zoomout',
),
'group' => 'General',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Overlay Background Color', 'ultimate_vc' ),
'param_name' => 'overlay_bg_color',
'value' => '#333333',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'number',
'heading' => __( 'Overlay Background Opacity', 'ultimate_vc' ),
'param_name' => 'overlay_bg_opacity',
'value' => 80,
'min' => 10,
'max' => 100,
'suffix' => '%',
'description' => __( 'Select opacity of overlay background.', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Content Background Color', 'ultimate_vc' ),
'param_name' => 'content_bg_color',
'value' => '',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Header Background Color', 'ultimate_vc' ),
'param_name' => 'header_bg_color',
'value' => '',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'group' => 'General',
),
// Modal box size.
array(
'type' => 'dropdown',
'heading' => __( 'Modal Box Border', 'ultimate_vc' ),
'param_name' => 'modal_border_style',
'value' => array(
__( 'None', 'ultimate_vc' ) => '',
__( 'Solid', 'ultimate_vc' ) => 'solid',
__( 'Double', 'ultimate_vc' ) => 'double',
__( 'Dashed', 'ultimate_vc' ) => 'dashed',
__( 'Dotted', 'ultimate_vc' ) => 'dotted',
__( 'Inset', 'ultimate_vc' ) => 'inset',
__( 'Outset', 'ultimate_vc' ) => 'outset',
),
'description' => __( 'Do you want to give border to the modal content box?', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'number',
'heading' => __( 'Border Width', 'ultimate_vc' ),
'param_name' => 'modal_border_width',
'value' => 2,
'min' => 1,
'max' => 25,
'suffix' => 'px',
'description' => __( 'Select size of border.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_border_style',
'not_empty' => true,
),
'group' => 'General',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Border Color', 'ultimate_vc' ),
'param_name' => 'modal_border_color',
'value' => '#333333',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_border_style',
'not_empty' => true,
),
'group' => 'General',
),
array(
'type' => 'number',
'heading' => __( 'Border Radius', 'ultimate_vc' ),
'param_name' => 'modal_border_radius',
'value' => 0,
'min' => 1,
'max' => 500,
'suffix' => 'px',
'description' => __( 'Want to shape the modal content box?.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_border_style',
'not_empty' => true,
),
'group' => 'General',
),
array(
'type' => 'textfield',
'heading' => __( 'Extra Class (Button/Image)', 'ultimate_vc' ),
'param_name' => 'init_extra_class',
'admin_label' => true,
'value' => '',
'description' => __( 'Provide ex class for this button/image.', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button', 'image' ),
),
'group' => 'General',
),
// Customize everything.
array(
'type' => 'textfield',
'heading' => __( 'Extra Class (Modal)', 'ultimate_vc' ),
'param_name' => 'el_class',
'value' => '',
'description' => __( 'Add extra class name that will be applied to the modal popup, and you can use this class for your customizations.', 'ultimate_vc' ),
'group' => 'General',
),
array(
'type' => 'ult_param_heading',
'text' => "
" . __( 'Need More Features?', 'ultimate_vc' ) . ' ',
'param_name' => 'notification',
'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12',
'group' => 'General',
),
// Close Button.
array(
'type' => 'ult_param_heading',
'text' => __( 'Close Button Settings', 'ultimate_vc' ),
'param_name' => 'close_settings',
'group' => 'Close Button',
'class' => 'ult-param-heading',
'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12',
),
array(
'type' => 'number',
'heading' => __( 'Size', 'ultimate_vc' ),
'param_name' => 'img_size',
'value' => 80,
'min' => 1,
'max' => 200,
'suffix' => 'px',
'description' => __( 'Default is 80px', 'ultimate_vc' ),
'group' => 'Close Button',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Background Color', 'ultimate_vc' ),
'param_name' => 'img_close_background_color',
'value' => '',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'group' => 'Close Button',
),
array(
'type' => 'dropdown',
'heading' => __( 'Close Icon Position', 'ultimate_vc' ),
'param_name' => 'close_icon_position',
'value' => array(
__( 'Window - Top Right', 'ultimate_vc' ) => 'top-right',
__( 'Window - Top Left', 'ultimate_vc' ) => 'top-left',
__( 'Popup - Top Right', 'ultimate_vc' ) => 'popup-top-right',
__( 'Popup - Top Left', 'ultimate_vc' ) => 'popup-top-left',
__( 'Popup Edge - Top Right', 'ultimate_vc' ) => 'popup-edge-top-right',
__( 'Popup Edge - Top Left', 'ultimate_vc' ) => 'popup-edge-top-left',
),
'description' => __( 'Where should the popup close icon appear?', 'ultimate_vc' ),
'group' => 'Close Button',
),
array(
'type' => 'ult_param_heading',
'text' => __( 'Close Modal On', 'ultimate_vc' ),
'param_name' => 'close_modal_on',
'group' => 'Close Button',
'class' => 'ult-param-heading',
'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12',
),
array(
'type' => 'ult_switch',
'class' => '',
'heading' => __( 'ESC Keypress', 'ultimate_vc' ),
'param_name' => 'keypress_enable_controls',
'value' => 'keypress_controls',
'options' => array(
'keypress_controls' => array(
'label' => '',
'on' => __( 'Yes', 'ultimate_vc' ),
'off' => __( 'No', 'ultimate_vc' ),
),
),
'edit_field_class' => 'vc_column vc_col-sm-4',
'group' => 'Close Button',
),
array(
'type' => 'ult_switch',
'class' => '',
'heading' => __( 'Overlay Click', 'ultimate_vc' ),
'param_name' => 'overlay_click_enable_controls',
'value' => 'overlay_click_controls',
'options' => array(
'overlay_click_controls' => array(
'label' => '',
'on' => __( 'Yes', 'ultimate_vc' ),
'off' => __( 'No', 'ultimate_vc' ),
),
),
'edit_field_class' => 'vc_column vc_col-sm-4',
'group' => 'Close Button',
),
// typography.
array(
'type' => 'ult_param_heading',
'text' => __( 'Header Settings', 'ultimate_vc' ),
'param_name' => 'header_typography',
'group' => 'Typography',
'class' => 'ult-param-heading',
'edit_field_class' => 'ult-param-heading-wrapper no-top-margin vc_column vc_col-sm-12',
),
array(
'type' => 'ultimate_google_fonts',
'heading' => __( 'Font Family', 'ultimate_vc' ),
'param_name' => 'header_font',
'group' => 'Typography',
),
array(
'type' => 'ultimate_google_fonts_style',
'heading' => __( 'Font Style', 'ultimate_vc' ),
'param_name' => 'header_font_style',
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Header Font Size', 'ultimate_vc' ),
'param_name' => 'header_font_size',
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Header Line Height', 'ultimate_vc' ),
'param_name' => 'header_line_height',
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Header Text Color', 'ultimate_vc' ),
'param_name' => 'header_text_color',
'value' => '#333333',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'group' => 'Typography',
),
array(
'type' => 'ult_param_heading',
'text' => __( 'Modal Content Settings', 'ultimate_vc' ),
'param_name' => 'desc_typography',
'group' => 'Typography',
'class' => 'ult-param-heading',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'ultimate_google_fonts',
'heading' => __( 'Font Family', 'ultimate_vc' ),
'param_name' => 'content_font',
'group' => 'Typography',
),
array(
'type' => 'ultimate_google_fonts_style',
'heading' => __( 'Font Style', 'ultimate_vc' ),
'param_name' => 'content_font_style',
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Content Font Size', 'ultimate_vc' ),
'param_name' => 'content_font_size',
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Content Line Height', 'ultimate_vc' ),
'param_name' => 'content_line_height',
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Content Text Color', 'ultimate_vc' ),
'param_name' => 'content_text_color',
'value' => '',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'group' => 'Typography',
),
array(
'type' => 'ult_param_heading',
'text' => __( 'Trigger Text Setting', 'ultimate_vc' ),
'param_name' => 'trigger_typography',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'group' => 'Typography',
'class' => 'ult-param-heading',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'ultimate_google_fonts',
'heading' => __( 'Font Family', 'ultimate_vc' ),
'param_name' => 'trigger_text_font',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_google_fonts_style',
'heading' => __( 'Font Style', 'ultimate_vc' ),
'param_name' => 'trigger_text_font_style',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Trigger Text Font Size', 'ultimate_vc' ),
'param_name' => 'trigger_text_font_size',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Trigger Text Line Height', 'ultimate_vc' ),
'param_name' => 'trigger_text_line_height',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'colorpicker',
'class' => '',
'heading' => __( 'Text Color', 'ultimate_vc' ),
'param_name' => 'txt_color',
'value' => '#f60f60',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'text' ),
),
'group' => 'Typography',
),
array(
'type' => 'ult_param_heading',
'text' => __( 'Button Setting', 'ultimate_vc' ),
'param_name' => 'button_typography',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'Typography',
'class' => 'ult-param-heading',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'ultimate_google_fonts',
'heading' => __( 'Font Family', 'ultimate_vc' ),
'param_name' => 'button_text_font',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_google_fonts_style',
'heading' => __( 'Font Style', 'ultimate_vc' ),
'param_name' => 'button_text_font_style',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Trigger Text Font Size', 'ultimate_vc' ),
'param_name' => 'button_text_font_size',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'ultimate_responsive',
'class' => '',
'heading' => __( 'Trigger Text Line Height', 'ultimate_vc' ),
'param_name' => 'button_text_line_height',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'unit' => 'px',
'media' => array(
'Desktop' => '',
'Tablet' => '',
'Tablet Portrait' => '',
'Mobile Landscape' => '',
'Mobile' => '',
),
'group' => 'Typography',
),
array(
'type' => 'colorpicker',
'heading' => __( 'Button Text Color', 'ultimate_vc' ),
'param_name' => 'btn_txt_color',
'value' => '#FFFFFF',
'group' => 'General',
'description' => __( 'Give it a nice paint!', 'ultimate_vc' ),
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'ult-button' ),
),
'group' => 'Typography',
),
array(
'type' => 'css_editor',
'heading' => __( 'Css', 'ultimate_vc' ),
'param_name' => 'css_modal_box',
'group' => __( 'Design ', 'ultimate_vc' ),
'edit_field_class' => 'vc_col-sm-12 vc_column no-vc-background no-vc-border creative_link_css_editor',
'dependency' => array(
'element' => 'modal_on',
'value' => array( 'image', 'text', 'ult-button' ),
),
),
), // end params array.
) // end vc_map array.
); // end vc_map.
} // end function check 'vc_map'.
}//end ultimate_modal_init()
}//end class
}
if ( class_exists( 'Ultimate_VC_Addons_Modals' ) ) {
$ultimate_modals = new Ultimate_VC_Addons_Modals();
}
if ( class_exists( 'WPBakeryShortCode' ) && ! class_exists( 'WPBakeryShortCode_Ultimate_Modal' ) ) {
/**
* Class WPBakeryShortCode_Ultimate_Modal
*/
class WPBakeryShortCode_Ultimate_Modal extends WPBakeryShortCode {
}
}