????

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

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

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

/**
 * Adds the shortcode to the Visual Composer
 *
 * @since 1.4.1
 */
function vcex_heading_vc_map() {
	vc_map( array(
		'name'  => __( 'Heading', 'tb' ),
		'description' => __( 'A better heading module', 'tb' ),
		'base'  => 'vcex_heading',
		'category' => TB_THEME_BRANDING,
		'icon'  => 'vcex-heading vcex-icon fa fa-font',
		'params' => array(
			// General
			array(
				'type' => 'textfield',
				'heading' => __( 'Custom Classes', 'tb' ),
				'param_name' => 'el_class',
			),
			array(
				'type'  => 'dropdown',
				'heading'  => __( 'Visibility', 'tb' ),
				'param_name'  => 'visibility',
				'value' => array_flip( tb_visibility() ),
			),
			array(
				'type'  => 'dropdown',
				'heading'  => __( 'Style', 'tb' ),
				'param_name'  => 'style',
				'value' => array(
					__( 'Plain', 'tb' ) => 'plain',
					__( 'Bottom Border With Color', 'tb' ) => 'bottom-border-w-color',
					__( 'Graphical', 'tb' ) => 'graphical',
				),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Border Color', 'tb' ),
				'param_name' => 'inner_bottom_border_color',
				'dependency' => array( 'element' => 'style', 'value' => 'bottom-border-w-color' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Text Source', 'tb' ),
				'param_name' => 'source',
				'value' => array(
					__( 'Custom Text', 'tb' ) => '',
					__( 'Post or Page Title', 'tb' ) => 'post_title',
					__( 'Custom Field', 'tb' ) => 'custom_field',
				),
			),
			array(
				'type'  => 'vcex_textarea_html',
				'heading'  => __( 'Text', 'tb' ),
				'param_name'  => 'text',
				'value' => __( 'Heading', 'tb' ),
				'admin_label' => true,
				'vcex_rows' => 2,
				'description' => __( 'HTML Supported', 'tb' ),
				'dependency' => array( 'element' => 'source', 'is_empty' => true ),
			),
			array(
				'type' => 'textfield',
				'heading' => __( 'Custom Field', 'tb' ),
				'param_name' => 'custom_field',
				'dependency' => array( 'element' => 'source', 'value' => 'custom_field' ),
			),
			array(
				'type'  => 'dropdown',
				'heading'  => __( 'Font Family', 'tb' ),
				'param_name'  => 'font_family',
				'std' => '',
				'value' => vcex_fonts_array(),
			),
			array(
				'type' => 'dropdown',
				'heading'  => __( 'Tag', 'tb' ),
				'param_name'  => 'tag',
				'value'  => array(
					__( 'Default', 'tb' ) => '',
					'h1'  => 'h1',
					'h2'  => 'h2',
					'h3'  => 'h3',
					'h4'  => 'h4',
					'h5'  => 'h5',
					'div' => 'div',
					'span'  => 'span',
				),
			),
			array(
				'type'  => 'textfield',
				'heading'  => __( 'Font Size', 'tb' ),
				'param_name'  => 'font_size',
			),
			array(
				'type'  => 'textfield',
				'heading'  => __( 'Line Height', 'tb' ),
				'param_name'  => 'line_height',
			),
			array(
				'type'  => 'textfield',
				'heading'  => __( 'Letter Spacing', 'tb' ),
				'param_name'  => 'letter_spacing',
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Font Weight', 'tb' ),
				'param_name' => 'font_weight',
				'value' => array_flip( tb_font_weights() ),
				'std'  => '',
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Text Align', 'tb' ),
				'param_name' => 'text_align',
				'value' => array_flip( tb_alignments() ),
				'std'  => '',
			),
			array(
				'type'  => 'colorpicker',
				'heading'  => __( 'Color', 'tb' ),
				'param_name'  => 'color',
			),
			// Link
			array(
				'type' => 'vc_link',
				'heading' => __( 'URL', 'tb' ),
				'param_name' => 'link',
				'group' => __( 'Link', 'tb' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'Link: Local Scroll', 'tb' ),
				'param_name' => 'link_local_scroll',
				'value' => array(
					__( 'No', 'tb' ) => 'false',
					__( 'Yes', 'tb' )  => 'true',
				),
				'group' => __( 'Link', 'tb' ),
			),
			array(
				'type'  => 'colorpicker',
				'heading'  => __( 'Color: Hover', 'tb' ),
				'param_name'  => 'color_hover',
			),
			// 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',
				),
				'group' => __( 'Icon', 'tb' ),
			),
			array(
				'type' => 'iconpicker',
				'heading' => __( 'Icon', 'tb' ),
				'param_name' => 'icon',
				'value' => '',
				'settings' => array(
					'emptyIcon' => true,
					'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' => 'dropdown',
				'heading' => __( 'Position', 'tb' ),
				'param_name' => 'icon_position',
				'value' => array(
					__( 'Left', 'tb' ) => 'left',
					__( 'Right', 'tb' )  => 'right',
				),
				'group' => __( 'Icon', 'tb' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Color', 'tb' ),
				'param_name' => 'icon_color',
				'group' => __( 'Icon', 'tb' ),
			),
			// CSS
			array(
				'type' => 'css_editor',
				'heading' => __( 'Design', 'tb' ),
				'param_name' => 'css',
				'group' => __( 'CSS', 'tb' ),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __( 'Background: Hover', 'tb' ),
				'param_name' => 'background_hover',
				'group' => __( 'CSS', 'tb' ),
				'dependency' => array( 'element' => 'style', 'value' => 'plain' ),
			),
			array(
				'type' => 'dropdown',
				'heading' => __( 'White Text On Hover', 'tb' ),
				'param_name' => 'hover_white_text',
				'value' => array(
					__( 'No', 'tb' ) => 'false',
					__( 'Yes', 'tb' ) => 'true',
				),
				'group' => __( 'CSS', 'tb' ),
				'dependency' => array( 'element' => 'style', 'value' => 'plain' ),
			),
		)
	) );
}
add_action( 'vc_before_init', 'vcex_heading_vc_map' );