????
| Current Path : /home2/morganrand/www/wp-content/themes/wanderfuls/framework/visual-composer/shortcodes/ |
| Current File : /home2/morganrand/www/wp-content/themes/wanderfuls/framework/visual-composer/shortcodes/divider.php |
<?php
/**
* Visual Composer Divider
*
* @package Wanderfuls WordPress Theme
* @subpackage VC Functions
* @version 3.0.0
*/
/**
* Register shortcode with VC Composer
*
* @since 2.0.0
*/
class WPBakeryShortCode_vcex_divider extends WPBakeryShortCode {
protected function content( $atts, $content = null ) {
ob_start();
include( locate_template( 'vcex_templates/vcex_divider.php' ) );
return ob_get_clean();
}
}
/**
* Adds the shortcode to the Visual Composer
*
* @since 1.4.1
*/
function vcex_divider_shortcode_vc_map() {
vc_map( array(
'name' => __( 'Divider', 'tb' ),
'description' => __( 'Line Separator', 'tb' ),
'base' => 'vcex_divider',
'icon' => 'vcex-divider vcex-icon fa fa-ellipsis-h',
'category' => TB_THEME_BRANDING,
'params' => array(
// General
array(
'type' => 'textfield',
'heading' => __( 'Classes', 'tb' ),
'param_name' => 'el_class',
'description' => __( 'Add additonal classes to the main element.', 'tb' ),
),
array(
'type' => 'dropdown',
'heading' => __( 'Appear Animation', 'tb' ),
'param_name' => 'css_animation',
'value' => array(
__( 'No', 'tb' ) => '',
__( 'Top to bottom', 'tb' ) => 'top-to-bottom',
__( 'Bottom to top', 'tb' ) => 'bottom-to-top',
__( 'Left to right', 'tb' ) => 'left-to-right',
__( 'Right to left', 'tb' ) => 'right-to-left',
__( 'Appear from center', 'tb' ) => 'appear'
),
),
array(
'type' => 'dropdown',
'heading' => __( 'Visibility', 'tb' ),
'param_name' => 'visibility',
'value' => array_flip( tb_visibility() ),
),
array(
'type' => 'dropdown',
'admin_label' => true,
'heading' => __( 'Style', 'tb' ),
'param_name' => 'style',
'value' => array(
__( 'Solid', 'tb') => 'solid',
__( 'Dashed', 'tb' ) => 'dashed',
__( 'Double', 'tb' ) => 'double',
__( 'Dotted Line', 'tb' ) => 'dotted-line',
__( 'Dotted', 'tb' ) => 'dotted',
),
),
array(
'type' => 'textfield',
'heading' => __( 'Width', 'tb' ),
'param_name' => 'width',
'description' => __( 'Enter a pixel or percentage value.', 'tb' ),
'group' => __( 'Design', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Height', 'tb' ),
'param_name' => 'height',
'dependency' => Array(
'element' => 'style',
'value' => array( 'solid', 'dashed', 'double', 'dotted-line' ),
),
'group' => __( 'Design', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Height', 'tb' ),
'param_name' => 'dotted_height',
'dependency' => Array(
'element' => 'style',
'value' => 'dotted',
),
'group' => __( 'Design', 'tb' ),
),
array(
'type' => 'colorpicker',
'heading' => __( 'Color', 'tb' ),
'param_name' => 'color',
'value' => '',
'dependency' => Array(
'element' => 'style',
'value' => array( 'solid', 'dashed', 'double', 'dotted-line' ),
),
'group' => __( 'Design', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Margin Top', 'tb' ),
'param_name' => 'margin_top',
'description' => __( 'Please enter a px value.', 'tb' ),
'group' => __( 'Design', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Margin Bottom', 'tb' ),
'description' => __( 'Please enter a px value.', 'tb' ),
'param_name' => 'margin_bottom',
'group' => __( 'Design', 'tb' ),
),
// Icon
array(
'type' => 'dropdown',
'heading' => __( 'Icon library', 'tb' ),
'param_name' => 'icon_type',
'description' => __( 'Select icon library.', 'tb' ),
'value' => array(
__( 'Font Awesome', 'tb' ) => 'fontawesome',
__( 'Open Iconic', 'tb' ) => 'openiconic',
__( 'Typicons', 'tb' ) => 'typicons',
__( 'Entypo', 'tb' ) => 'entypo',
__( 'Linecons', 'tb' ) => 'linecons',
__( 'Pixel', 'tb' ) => 'pixelicons',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'iconpicker',
'heading' => __( 'Icon', 'tb' ),
'param_name' => 'icon',
'std' => '',
'settings' => array(
'emptyIcon' => true,
'type' => 'fontawesome',
'iconsPerPage' => 200,
),
'dependency' => array(
'element' => 'icon_type',
'value' => 'fontawesome',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'iconpicker',
'heading' => __( 'Icon', 'tb' ),
'param_name' => 'icon_openiconic',
'settings' => array(
'emptyIcon' => true,
'type' => 'openiconic',
'iconsPerPage' => 200,
),
'dependency' => array(
'element' => 'icon_type',
'value' => 'openiconic',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'iconpicker',
'heading' => __( 'Icon', 'tb' ),
'param_name' => 'icon_typicons',
'settings' => array(
'emptyIcon' => true,
'type' => 'typicons',
'iconsPerPage' => 200,
),
'dependency' => array(
'element' => 'icon_type',
'value' => 'typicons',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'iconpicker',
'heading' => __( 'Icon', 'tb' ),
'param_name' => 'icon_entypo',
'settings' => array(
'emptyIcon' => true,
'type' => 'entypo',
'iconsPerPage' => 300,
),
'dependency' => array(
'element' => 'icon_type',
'value' => 'entypo',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'iconpicker',
'heading' => __( 'Icon', 'tb' ),
'param_name' => 'icon_linecons',
'settings' => array(
'emptyIcon' => true,
'type' => 'linecons',
'iconsPerPage' => 200,
),
'dependency' => array(
'element' => 'icon_type',
'value' => 'linecons',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'iconpicker',
'heading' => __( 'Icon', 'tb' ),
'param_name' => 'icon_pixelicons',
'settings' => array(
'emptyIcon' => true,
'type' => 'pixelicons',
'source' => vcex_pixel_icons(),
),
'dependency' => array(
'element' => 'icon_type',
'value' => 'pixelicons',
),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'colorpicker',
'heading' => __( 'Icon Color', 'tb' ),
'param_name' => 'icon_color',
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'colorpicker',
'heading' => __( 'Icon Background', 'tb' ),
'param_name' => 'icon_bg',
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Icon Size', 'tb' ),
'param_name' => 'icon_size',
'description' => __( 'You can use em or px values, but you must define them.', 'tb' ),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Icon Height', 'tb' ),
'param_name' => 'icon_height',
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Icon Width', 'tb' ),
'param_name' => 'icon_width',
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Icon Padding', 'tb' ),
'param_name' => 'icon_padding',
'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
'group' => __( 'Icon', 'tb' ),
),
array(
'type' => 'textfield',
'heading' => __( 'Icon Border Radius', 'tb' ),
'param_name' => 'icon_border_radius',
'description' => __( 'Please enter a px value. Or enter 100% for a circle.', 'tb' ),
'group' => __( 'Icon', 'tb' ),
),
)
) );
}
add_action( 'vc_before_init', 'vcex_divider_shortcode_vc_map' );