????

Your IP : 216.73.216.152


Current Path : /home2/morganrand/www/wp-content/themes/wanderfuls/framework/visual-composer/shortcodes/
Upload File :
Current File : /home2/morganrand/www/wp-content/themes/wanderfuls/framework/visual-composer/shortcodes/feature.php

<?php
/**
 * Visual Composer Feature Box
 *
 * @package Wanderfuls WordPress Theme
 * @subpackage VC Functions
 * @version 3.0.0
 */

/**
 * Register shortcode with VC Composer
 *
 * @since 2.0.0
 */
class WPBakeryShortCode_vcex_feature_box extends WPBakeryShortCode {
	protected function content( $atts, $content = null ) {
		ob_start();
		include( locate_template( 'vcex_templates/vcex_feature_box.php' ) );
		return ob_get_clean();
	}
}

/**
 * Adds the shortcode to the Visual Composer
 *
 * @since 1.4.1
 */
function vcex_feature_box_vc_map() {
	vc_map( array(
		'name' => __( 'Feature Box', 'tb' ),
		'description' => __( 'A feature content box', 'tb' ),
		'base' => 'vcex_feature_box',
		'category' => TB_THEME_BRANDING,
		'icon' => 'vcex-feature-box vcex-icon fa fa-trophy',
		'params' => array(
			// General
			array(
				'type' => 'textfield',
				'heading' => __( 'Unique Id', 'tb' ),
				'param_name' => 'unique_id',
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Custom Classes', 'tb' ),
				'param_name' => 'classes',
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Visibility', 'tb' ),
				'param_name' => 'visibility',
				'value' => array_flip( tb_visibility() ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Appear Animation', 'tb'),
				'param_name' => 'css_animation',
				'value' => array_flip( tb_css_animations() ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Style', 'tb' ),
				'param_name' => 'style',
				'value' => array(
					__( 'Left Content - Right Image', 'tb' ) => 'left-content-right-image',
					__( 'Left Image - Right Content', 'tb' ) => 'left-image-right-content',
				),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Alignment', 'tb' ),
				'param_name' => 'text_align',
				'value' => array(
					__( 'Default', 'tb' ) => '',
					__( 'Center', 'tb' ) => 'center',
					__( 'Left', 'tb' ) => 'left',
					__( 'Right', 'tb' ) => 'right',
				),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Padding', 'tb' ),
				'param_name' => 'padding',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Border', 'tb' ),
				'description' => __( 'Please use the shorthand format: width style color. Enter 0px or "none" to disable border.', 'tb' ),
				'param_name' => 'border',
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Background', 'tb' ),
				'param_name' => 'background',
			),
			// Heading
			array(
				'type' => 'textfield',
				'heading' => __( 'Heading', 'tb' ),
				'param_name' => 'heading',
				'value' => 'Sample Heading',
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'HTML Tag', 'tb' ),
				'param_name' => 'heading_type',
				'group' => __( 'Heading', 'tb' ),
				'value' => array(
					'h2' => 'h2',
					'h3' => 'h3',
					'h4' => 'h4',
					__( 'h5', 'tb' ) => 'h5',
					'div' => 'div',
				),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type' => 'vc_link',
				'heading' => __( 'Link', 'tb' ),
				'param_name' => 'heading_url',
				'group' => __( 'Heading', 'tb' ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type'  => 'dropdown',
				'heading' => __( 'Font Family', 'tb' ),
				'param_name' => 'heading_font_family',
				'std' => '',
				'value' => vcex_fonts_array(),
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Heading Color', 'tb' ),
				'param_name' => 'heading_color',
				'group' => __( 'Heading', 'tb' ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Font Weight', 'tb' ),
				'param_name' => 'heading_weight',
				'std' => '',
				'value' => array_flip( tb_font_weights() ),
				'group' => __( 'Heading', 'tb' ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Heading Text Transform', 'tb' ),
				'param_name' => 'heading_transform',
				'group' => __( 'Heading', 'tb' ),
				'value' => array_flip( tb_text_transforms() ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Font Size', 'tb' ),
				'param_name' => 'heading_size',
				'group' => __( 'Heading', 'tb' ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Letter Spacing', 'tb' ),
				'param_name' => 'heading_letter_spacing',
				'group' => __( 'Heading', 'tb' ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Margin', 'tb' ),
				'param_name' => 'heading_margin',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
				'group' => __( 'Heading', 'tb' ),
				'dependency' => array( 'element' => 'heading', 'not_empty' => true ),
			),
			// Content
			array(
				'type' => 'textarea_html',
				'holder' => 'div',
				'heading' => __( 'Content', 'tb' ),
				'param_name' => 'content',
				'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.',
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Padding', 'tb' ),
				'param_name' => 'content_padding',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
				'group' => __( 'Content', 'tb' ),
				'dependency' => array( 'element' => 'content', 'not_empty' => true ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Font Size', 'tb' ),
				'param_name' => 'content_font_size',
				'group' => __( 'Content', 'tb' ),
				'dependency' => array( 'element' => 'content', 'not_empty' => true ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Font Weight', 'tb' ),
				'param_name' => 'content_font_weight',
				'std' => '',
				'value' => array_flip( tb_font_weights() ),
				'group' => __( 'Content', 'tb' ),
				'dependency' => array( 'element' => 'content', 'not_empty' => true ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Background', 'tb' ),
				'param_name' => 'content_background',
				'group' => __( 'Content', 'tb' ),
				'dependency' => array( 'element' => 'content', 'not_empty' => true ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Color', 'tb' ),
				'param_name' => 'content_color',
				'group' => __( 'Content', 'tb' ),
				'dependency' => array( 'element' => 'content', 'not_empty' => true ),
			),
			// Image
			array(
				'type' => 'attach_image',
				'heading' => __( 'Image', 'tb' ),
				'param_name' => 'image',
				'group' => __( 'Image', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Equal Heights?', 'tb' ),
				'param_name' => 'equal_heights',
				'value' => array(
					__( 'No', 'tb' ) => 'false',
					__( 'Yes', 'tb' ) => 'true',
				),
				'description' => __( 'Keeps the image column the same height as your content.', 'tb' ),
				'group' => __( 'Image', 'tb' ),
			),
			array(
				'type' => 'vc_link',
				'heading' => __( 'Image URL', 'tb' ),
				'param_name' => 'image_url',
				'group' => __( 'Image', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Lightbox Type', 'tb' ),
				'param_name' => 'image_lightbox',
				'group' => __( 'Image', 'tb' ),
				'value' => array(
					__( 'None', 'tb' ) => '',
					__( 'Self', 'tb' ) => 'image',
					__( 'URL', 'tb' ) => 'url',
					__( 'Auto Detect - slow', 'tb' ) => 'auto-detect',
					__( 'Video', 'tb' ) => 'video_embed',
					__( 'HTML5', 'tb' ) => 'html5',
					__( 'Quicktime', 'tb' ) => 'quicktime',
				),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Image Size', 'tb' ),
				'param_name' => 'img_size',
				'std' => 'tb_custom',
				'value' => vcex_image_sizes(),
				'group' => __( 'Image', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Image Crop Location', 'tb' ),
				'param_name' => 'img_crop',
				'std' => 'center-center',
				'value' => array_flip( tb_image_crop_locations() ),
				'group' => __( 'Image', 'tb' ),
				'dependency' => array( 'element' => 'img_size', 'value' => 'tb_custom' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Image Width', 'tb' ),
				'param_name' => 'img_width',
				'description' => __( 'Enter a width in pixels.', 'tb' ),
				'group' => __( 'Image', 'tb' ),
				'dependency' => array( 'element' => 'img_size', 'value' => 'tb_custom' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Image Height', 'tb' ),
				'param_name' => 'img_height',
				'description' => __( 'Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'tb' ),
				'group' => __( 'Image', 'tb' ),
				'dependency' => array( 'element' => 'img_size', 'value' => 'tb_custom' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Border Radius', 'tb' ),
				'param_name' => 'img_border_radius',
				'description' => __( 'Please enter a px value.', 'tb' ),
				'group' => __( 'Image', 'tb' ),
				'dependency' => array( 'element' => 'image', 'not_empty' => true ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'CSS3 Image Hover', 'tb' ),
				'param_name' => 'img_hover_style',
				'value' => array_flip( tb_image_hovers() ),
				'group' => __( 'Image', 'tb' ),
				'dependency' => array( 'element' => 'image', 'not_empty' => true ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Image Filter', 'tb' ),
				'param_name' => 'img_filter',
				'value' => array_flip( tb_image_filters() ),
				'group' => __( 'Image', 'tb' ),
				'dependency' => array( 'element' => 'image', 'not_empty' => true ),
			),
			// Video
			array(
				'type' => 'textfield',
				'heading' => __( 'Video link', 'tb' ),
				'param_name' => 'video',
				'description' => __('Enter a URL that is compatible with WP\'s built-in oEmbed feature. ', 'tb' ),
				'group' => __( 'Video', 'tb' ),
			),
			// Widths
			array(
				'type' => 'textfield',
				'heading' => __( 'Content Width', 'tb' ),
				'param_name' => 'content_width',
				'value' => '50%',
				'group' => __( 'Widths', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Image Width', 'tb' ),
				'param_name' => 'media_width',
				'value' => '50%',
				'group' => __( 'Widths', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Tablet Widths', 'tb' ),
				'param_name' => 'tablet_widths',
				'group' => __( 'Widths', 'tb' ),
				'value' => array(
					__( 'Inherit', 'tb' ) => '',
					__( 'Full-Width', 'tb' ) => 'fullwidth',
				),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Phone Widths', 'tb' ),
				'param_name' => 'phone_widths',
				'group' => __( 'Widths', 'tb' ),
				'value' => array(
					__( 'Inherit', 'tb' ) => '',
					__( 'Full-Width', 'tb' ) => 'fullwidth',
				),
			),

		)
	) );
}
add_action( 'vc_before_init', 'vcex_feature_box_vc_map' );