????

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/teaser.php

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

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

/**
 * Adds the shortcode to the Visual Composer
 *
 * @since 1.4.1
 */
function vcex_teaser_shortcode_vc_map() {
	vc_map( array(
		'name' => __( 'Teaser Box', 'tb' ),
		'description' => __( 'A teaser content box', 'tb' ),
		'base' => 'vcex_teaser',
		'category' => TB_THEME_BRANDING,
		'icon' => 'vcex-teaser vcex-icon fa fa-file-text-o',
		'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' => __( 'Hover Animation', 'tb'),
				'param_name' => 'hover_animation',
				'value' => array_flip( tb_hover_css_animations() ),
				'std' => '',
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Text Align', 'tb' ),
				'param_name' => 'text_align',
				'value' => array(
					__( 'Default', 'tb' ) => '',
					__( 'Center', 'tb' ) => 'center',
					__( 'Left', 'tb' ) => 'left',
					__( 'Right', 'tb' ) => 'right',
				),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Style', 'tb' ),
				'param_name' => 'style',
				'value' => array(
					__( 'Default', 'tb' ) => '',
					__( 'Plain', 'tb' ) => 'one',
					__( 'Boxed 1 - Legacy', 'tb' ) => 'two',
					__( 'Boxed 2 - Legacy', 'tb' ) => 'three',
					__( 'Outline - Legacy', 'tb' ) => 'four',
				),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Padding', 'tb' ),
				'param_name' => 'padding',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
				'dependency' => array( 'element' => 'style', 'value' => 'two' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Background Color', 'tb' ),
				'param_name' => 'background',
				'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Border Color', 'tb' ),
				'param_name' => 'border_color',
				'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Border Radius', 'tb' ),
				'param_name' => 'border_radius',
				'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ),
			),
			// Heading
			array(
				'type' => 'textfield',
				'heading' => __( 'Heading', 'tb' ),
				'param_name' => 'heading',
				'value' => 'Sample Heading',
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Heading Color', 'tb' ),
				'param_name' => 'heading_color',
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Heading Type', 'tb' ),
				'param_name' => 'heading_type',
				'group' => __( 'Heading', 'tb' ),
				'value' => array(
					'h2' => 'h2',
					'h3' => 'h3',
					'h4' => 'h4',
					'h5' => 'h5',
					'div' => 'div',
				),
			),
			array(
				'type'  => 'dropdown',
				'heading' => __( 'Font Family', 'tb' ),
				'param_name' => 'heading_font_family',
				'std' => '',
				'value' => vcex_fonts_array(),
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Heading Font Weight', 'tb' ),
				'param_name' => 'heading_weight',
				'std' => '',
				'value' => array_flip( tb_font_weights() ),
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Heading Text Transform', 'tb' ),
				'param_name' => 'heading_transform',
				'group' => __( 'Heading', 'tb' ),
				'value' => array_flip( tb_text_transforms() ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Heading Font Size', 'tb' ),
				'param_name' => 'heading_size',
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Heading Margin', 'tb' ),
				'param_name' => 'heading_margin',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
				'group' => __( 'Heading', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Heading Letter Spacing', 'tb' ),
				'param_name' => 'heading_letter_spacing',
				'group' => __( 'Heading', 'tb' ),
			),
			// Content
			array(
				'type' => 'textarea_html',
				'holder' => 'div',
				'heading' => __( 'Content', 'tb' ),
				'param_name' => 'content',
				'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.',
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Content Margin', 'tb' ),
				'param_name' => 'content_margin',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Content Padding', 'tb' ),
				'param_name' => 'content_padding',
				'description' => __( 'Please use the following format: top right bottom left.', 'tb' ),
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Content Font Size', 'tb' ),
				'param_name' => 'content_font_size',
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Content Font Weight', 'tb' ),
				'param_name' => 'content_font_weight',
				'std' => '',
				'value' => array_flip( tb_font_weights() ),
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Content Font Color', 'tb' ),
				'param_name' => 'content_color',
				'group' => __( 'Content', 'tb' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Content Background', 'tb' ),
				'param_name' => 'content_background',
				'group' => __( 'Content', 'tb' ),
			),
			// Media
			array(
				'type' => 'attach_image',
				'heading' => __( 'Image', 'tb' ),
				'param_name' => 'image',
				'group' => __( 'Media', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Video link', 'tb' ),
				'param_name' => 'video',
				'description' => __( 'Enter in a video URL that is compatible with WordPress\'s built-in oEmbed feature.', 'tb' ),
				'group' => __( 'Media', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Image Style', 'tb' ),
				'param_name' => 'img_style',
				'value' => array(
					__( 'Default', 'tb' ) => '',
					__( 'Stretch', 'tb' ) => 'stretch',
				),
				'group' => __( 'Media', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Image Crop Width', 'tb' ),
				'param_name' => 'img_width',
				'group' => __( 'Media', 'tb' ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Image Crop Height', 'tb' ),
				'param_name' => 'img_height',
				'description' => __( 'Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'tb' ),
				'group' => __( 'Media', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Image Filter', 'tb' ),
				'param_name' => 'img_filter',
				'value' => array_flip( tb_image_filters() ),
				'group' => __( 'Media', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'CSS3 Image Hover', 'tb' ),
				'param_name' => 'img_hover_style',
				'value' => array_flip( tb_image_hovers() ),
				'group' => __( 'Media', 'tb' ),
			),
			// Link
			array(
				'type' => 'vc_link',
				'heading' => __( 'URL', 'tb' ),
				'param_name' => 'url',
				'group' => __( 'Link', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Link: Local Scroll', 'tb' ),
				'param_name' => 'url_local_scroll',
				'group' => __( 'Link', 'tb' ),
				'value' => array(
					__( 'False', 'tb' ) => '',
					__( 'True', 'tb' ) => 'true',
				),
			),
			// CSS
			array(
				'type' => 'css_editor',
				'heading' => __( 'Design', 'tb' ),
				'param_name' => 'css',
				'group' => __( 'Design', 'tb' ),
			),
		)
	) );
}
add_action( 'vc_before_init', 'vcex_teaser_shortcode_vc_map' );