';
if ( isset( $ult_range_settings['slider_data'] ) ) {
foreach ( $ult_range_settings['slider_data'] as $slider_datas ) {
if ( isset( $slider_datas['slider_title'] ) ) {
// $output .= '
';
$output .= '
' . $slider_datas['slider_title'];
$output .= '
';
}
++$title_count;
}
}
$output .= '
';
$output .= '
';
// description data.
if ( isset( $ult_range_settings['slider_data'] ) ) {
$output .= '
';
foreach ( $ult_range_settings['slider_data'] as $slider_datas ) {
if ( isset( $slider_datas['slider_desc'] ) ) {
$output .= '
' . $slider_datas['slider_desc'] . '
';
}
++$desc_count;
}
$output .= '
';
}
$output .= '
'; // wrapper div close.
return $output;
}
/**
* Function that initializes settings of Range Slider Module.
*
* @method init_range_slider
*/
public function init_range_slider() {
if ( function_exists( 'vc_map' ) ) {
vc_map(
array(
'name' => __( 'Range Slider', 'ultimate_vc' ),
'base' => 'ult_range_slider',
'icon' => 'vc_icon_range_slider',
'class' => '',
'content_element' => true,
'controls' => 'full',
'category' => 'Ultimate VC Addons',
'description' => __( 'Create creative range sliders.', 'ultimate_vc' ),
'params' => array(
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'Slider Content', 'ultimate_vc' ),
'value' => '',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'param_group',
'heading' => __( 'Slider Text Setting', 'ultimate_vc' ),
'param_name' => 'slider_data',
'description' => __( 'Add content here steps will generate based on content', 'ultimate_vc' ),
'value' => rawurlencode(
wp_json_encode(
array(
array(
'slider_title' => '',
'slider_desc' => '',
),
)
)
),
'params' => array(
array(
'type' => 'textfield',
'heading' => __( 'Slider Title', 'ultimate_vc' ),
'param_name' => 'slider_title',
'description' => '',
'admin_label' => true,
),
array(
'type' => 'textarea',
'heading' => __( 'Slider Description', 'ultimate_vc' ),
'param_name' => 'slider_desc',
'value' => '',
'description' => '',
),
),
),
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'Slider Bar Color', 'ultimate_vc' ),
'value' => '',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'colorpicker',
'class' => '',
'heading' => __( 'Slider Bar Color', 'ultimate_vc' ),
'param_name' => 'slider_color',
'value' => '#3BF7D1',
'description' => '',
),
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'Slider Bar Width', 'ultimate_vc' ),
'value' => '',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'number',
'class' => '',
'heading' => __( 'Slider Width', 'ultimate_vc' ),
'param_name' => 'slider_bar_size',
'value' => '',
'suffix' => 'px',
'description' => __( 'If title box text or width is too long then slider width will reduce according to title box width', 'ultimate_vc' ),
),
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'Extra Class', 'ultimate_vc' ),
'value' => '',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'textfield',
'heading' => __( 'Extra class name', 'ultimate_vc' ),
'param_name' => 'el_class',
'description' => __( 'If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'ultimate_vc' ),
),
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'Title Box', 'ultimate_vc' ),
'value' => '',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
'group' => 'Title Box',
),
array(
'type' => 'colorpicker',
'class' => '',
'heading' => __( 'Title Color', 'ultimate_vc' ),
'param_name' => 'title_color',
'value' => '#444444',
'description' => '',
'group' => 'Title Box',
),
array(
'type' => 'colorpicker',
'class' => '',
'heading' => __( 'Background Color', 'ultimate_vc' ),
'param_name' => 'title_box_color',
'value' => '#fff',
'description' => '',
'group' => 'Title Box',
),
array(
'type' => 'ultimate_border',
'heading' => __( 'Title Box Border', 'ultimate_vc' ),
'param_name' => 'title_border',
'unit' => 'px',
'value' => 'border-style:solid;|border-width:2px;border-radius:0px;|border-color:#30eae9;', // [required] px,em,%,all Default all
'group' => 'Title Box',
'positions' => array(
__( 'Top', 'ultimate_vc' ) => '',
__( 'Right', 'ultimate_vc' ) => '',
__( 'Bottom', 'ultimate_vc' ) => '',
__( 'Left', 'ultimate_vc' ) => '',
),
'radius' => array(
__( 'Top Left', 'ultimate_vc' ) => '',
__( 'Top Right', 'ultimate_vc' ) => '',
__( 'Bottom Right', 'ultimate_vc' ) => '',
__( 'Bottom Left', 'ultimate_vc' ) => '',
),
),
array(
'type' => 'ultimate_spacing',
'heading' => __( 'Title Box Padding', 'ultimate_vc' ),
'param_name' => 'title_padding',
'mode' => 'padding',
'unit' => 'px',
'positions' => array(
__( 'Top', 'ultimate_vc' ) => '15',
__( 'Right', 'ultimate_vc' ) => '15',
__( 'Bottom', 'ultimate_vc' ) => '15',
__( 'Left', 'ultimate_vc' ) => '15',
),
'group' => 'Title Box',
),
array(
'type' => 'dropdown',
'class' => '',
'heading' => __( 'Title Box Size', 'ultimate_vc' ),
'param_name' => 'title_box',
'value' => array(
'Auto' => 'auto',
'Custom' => 'custom',
),
'description' => __( 'Set Title Box Size', 'ultimate_vc' ),
'group' => 'Title Box',
),
array(
'type' => 'number',
'class' => '',
'heading' => __( 'Width', 'ultimate_vc' ),
'param_name' => 'title_box_width',
'value' => '115',
'suffix' => 'px',
'description' => __( 'Ex: 20px', 'ultimate_vc' ),
'dependency' => array(
'element' => 'title_box',
'value' => 'custom',
),
'group' => 'Title Box',
),
array(
'type' => 'number',
'class' => '',
'heading' => __( 'Height', 'ultimate_vc' ),
'param_name' => 'title_box_height',
'value' => '115',
'suffix' => 'px',
'description' => __( 'Ex: 20px ', 'ultimate_vc' ),
'dependency' => array(
'element' => 'title_box',
'value' => 'custom',
),
'group' => 'Title Box',
),
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'Description Design Setting', 'ultimate_vc' ),
'value' => '',
'group' => 'Description',
'edit_field_class' => 'ult-param-heading-wrapper vc_column vc_col-sm-12',
),
array(
'type' => 'colorpicker',
'class' => '',
'heading' => __( 'Description Color', 'ultimate_vc' ),
'param_name' => 'desc_color',
'value' => '#444',
'description' => '',
'group' => 'Description',
),
array(
'type' => 'number',
'param_name' => 'desc_width',
'heading' => __( 'Width', 'ultimate_vc' ),
'value' => '',
'suffix' => 'px',
'group' => 'Description',
),
array(
'type' => 'ult_switch',
'class' => '',
'heading' => __( 'Adaptive Height', 'ultimate_vc' ),
'param_name' => 'adaptive_height',
'value' => '',
'options' => array(
'on' => array(
'label' => __( 'Turn on Adaptive Height', 'ultimate_vc' ),
'on' => 'Yes',
'off' => 'No',
),
),
'description' => __( 'If you have different height of descriptions. It will automatically adapt the maximum height. ', 'smile' ),
'dependency' => '',
'group' => 'Description',
),
array(
'type' => 'ultimate_spacing',
'heading' => __( 'Padding', 'ultimate_vc' ),
'param_name' => 'desc_padding',
'mode' => 'padding',
'unit' => 'px',
'positions' => array(
__( 'Top', 'ultimate_vc' ) => '35',
__( 'Right', 'ultimate_vc' ) => '35',
__( 'Bottom', 'ultimate_vc' ) => '35',
__( 'Left', 'ultimate_vc' ) => '35',
),
'group' => 'Description',
),
array(
'type' => 'ultimate_spacing',
'heading' => __( 'Margin', 'ultimate_vc' ),
'param_name' => 'desc_margin',
'mode' => 'margin',
'unit' => 'px',
'positions' => array(
__( 'Top', 'ultimate_vc' ) => '',
__( 'Bottom', 'ultimate_vc' ) => '',
),
'group' => 'Description',
),
array(
'type' => 'text',
'param_name' => 'title_typography',
'heading' => __( 'For Title', 'ultimate_vc' ),
'value' => '',
'group' => 'Typography',
'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' => 'title_font',
'value' => '',
'description' => __( "Click and select font of your choice. If you can't find the one that suits for your purpose", 'ultimate_vc' ) . ', ' . __( 'you can', 'ultimate_vc' ) . "