<?php
/*-----------------------------------------------------------------------------------*/
/*	Shortcode Filter
/*-----------------------------------------------------------------------------------*/

vc_remove_element( "vc_gmaps");
vc_remove_element( "vc_wp_search");
vc_remove_element(  "vc_wp_meta" );
vc_remove_element(  "vc_wp_recentcomments" );
vc_remove_element(  "vc_wp_calendar" );
vc_remove_element(  "vc_wp_pages" );
vc_remove_element(  "vc_wp_tagcloud" );
vc_remove_element(  "vc_wp_custommenu" );
vc_remove_element(  "vc_wp_text" );
vc_remove_element(  "vc_wp_posts" );
vc_remove_element(  "vc_wp_categories" );
vc_remove_element(  "vc_wp_archives" );
vc_remove_element(  "vc_wp_rss" );
vc_remove_element(  "vc_progress_bar" );
vc_remove_element(  "vc_message" );
vc_set_as_theme( $disable_updater = false ); 
vc_is_updater_disabled();

function froday_vc_remove_woocommerce() {
        vc_remove_element( 'woocommerce_cart' );
        vc_remove_element( 'woocommerce_checkout' );
        vc_remove_element( 'woocommerce_order_tracking' );
        vc_remove_element( 'woocommerce_my_account' );
        vc_remove_element( 'recent_products' );
        vc_remove_element( 'featured_products' );
        vc_remove_element( 'product' );
        vc_remove_element( 'products' );
        vc_remove_element( 'add_to_cart' );
        vc_remove_element( 'add_to_cart_url' );
        vc_remove_element( 'product_page' );
        vc_remove_element( 'product_category' );
        vc_remove_element( 'product_categories' );
        vc_remove_element( 'sale_products' );
        vc_remove_element( 'best_selling_products' );
        vc_remove_element( 'top_rated_products' );
        vc_remove_element( 'product_attribute' );
        vc_remove_element( 'related_products' );
}
// Hook for admin editor.
add_action( 'vc_build_admin_page', 'froday_vc_remove_woocommerce', 11 );
// Hook for frontend editor.
add_action( 'vc_load_shortcode', 'froday_vc_remove_woocommerce', 11 );

/*-----------------------------------------------------------------------------------*/
/* froday Style
/*-----------------------------------------------------------------------------------*/

$attributes = array(

	array(
		'type' => 'css_editor',
		'param_name' => 'klb_responsive',
		'heading' => esc_html__( 'XS Responsive option', 'froday' ),
		'description' => esc_html__( 'These settings are worked for xsmall devices.', 'froday' ),
		'group' => esc_html__('Responsive Design','froday'),
	),

);
vc_add_params( 'vc_column', $attributes );

/*-----------------------------------------------------------------------------------*/
/*	Froday Coupon
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_coupon_integrateWithVC' );
function froday_coupon_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Coupon", "froday" ),
      "base" => "coupon",
	  "category" => "Froday",
      "params" => array(
	  
		array(
			'type' => 'loop',
			'heading' => esc_html__('Blog', 'froday'),
			'param_name' => 'build_query',
			'settings' => array(
				'size' => array('hidden' => false, 'value' => 4 * 3),
				'order_by' => array('value' => 'date'),
				'post_type' => array('value' => 'shop_coupon', 'hidden' => true),
				'categories' => array('hidden' => true),
				'tags' => array('hidden' => true),
				
			),
			'description' => esc_html__('Create WordPress loop, to populate content from your site.', 'froday')
		),
		
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Type', 'froday' ),
			'param_name' => 'type',
			'description' => esc_html__( 'Select a type for the coupons.', 'froday' ),
			'value' => array(
				esc_html__( 'Select Type', 'froday' ) => 'select-type',
				esc_html__( 'Grid', 'froday' ) => 'grid',
				esc_html__( 'List', 'froday' ) => 'list',
			),
		),

		array(
			'type' => 'checkbox',
			'param_name' => 'activate_pagination',
			'heading' => esc_html__( 'Activate Pagination?', 'froday' ),
			'description' => esc_html__( 'You want to use pagination for the posts?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'yes' ),
		),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Subscribe Title", "froday"),
            "param_name" => "subscribe_title",
            "description" => esc_html__("Set subscribe title.", "froday"),
			"group"       => 'Subscribe',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Subscribe Subtitle", "froday"),
            "param_name" => "subscribe_subtitle",
            "description" => esc_html__("Set subscribe subtitle.", "froday"),
			"group"       => 'Subscribe',
        ),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Subscribe Form Id", "froday"),
            "param_name" => "subscribe_form_id",
            "description" => esc_html__("You can find the form id in Dashboard > Mailchimp For Wp > Form", "froday"),
			"group"       => 'Subscribe',
        ),
		
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Columns', 'froday' ),
			'param_name' => 'column_count',
			'value' => array(
				esc_html__( 'Select Column', 'froday' ) => 'select-column',
				esc_html__( 'Column 2', 'froday' ) => 'col-md-6',						
				esc_html__( 'Column 3', 'froday' ) => 'col-md-4',						
				esc_html__( 'Column 4', 'froday' ) => 'col-md-3',						
			),			
			'description' => esc_html__( 'Set column count for the coupons.', 'froday' ),
			'group' => 'Columns',
		),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Expires On", "froday"),
            "param_name" => "translate_expires",
            "description" => esc_html__("Translate the text: Expires On.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Show Code", "froday"),
            "param_name" => "translate_showcode",
            "description" => esc_html__("Translate the text: Show Code.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Click Below", "froday"),
            "param_name" => "translate_clickbelow",
            "description" => esc_html__("Translate the text: Click below to get your coupon code.", "froday"),
			"group"       => 'Translate',
        ),
		
      ),
   ) );
}
class WPBakeryShortCode_Coupon extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Product Slider
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_product_slider_integrateWithVC' );
function froday_product_slider_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Product Slider", "froday" ),
      "base" => "product_slider",
	  "category" => "Froday",
      "params" => array(
	  
		array(
			'type' => 'loop',
			'heading' => esc_html__('Product Slider', 'froday'),
			'param_name' => 'build_query',
			'settings' => array(
				'size' => array('hidden' => false, 'value' => 4 * 3),
				'order_by' => array('value' => 'date'),
				'post_type' => array('value' => 'post', 'hidden' => true),
				'tax_query' => array('hidden' => true),
				'tags' => array('hidden' => true),
				
			),
			'description' => esc_html__('Create product slider loop.', 'froday')
		),

		array(
			'type' => 'checkbox',
			'param_name' => 'dataloop',
			'heading' => esc_html__( 'Activate Loop?', 'froday' ),
			'description' => esc_html__( 'You want to use loop for the slider?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'true' ),
			'group' => esc_html__('Settings', 'froday'),
		),

		array(
			'type' => 'checkbox',
			'param_name' => 'autoplay',
			'heading' => esc_html__( 'Activate Autoplay?', 'froday' ),
			'description' => esc_html__( 'You want to activate autoplay?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'true' ),
			'group' => esc_html__('Settings', 'froday'),
		),

		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Autoplay Timeout', 'froday' ),
			'param_name' => 'autoplaytimeout',
			'description' => esc_html__( 'Set autoplay timeout.', 'froday' ),
			'value' => array(
				esc_html__( 'Select Time', 'froday' ) => 'select-time',
				esc_html__( '1 Second', 'froday' ) => '1000',
				esc_html__( '2 Second', 'froday' ) => '2000',
				esc_html__( '3 Second', 'froday' ) => '3000',
				esc_html__( '4 Second', 'froday' ) => '4000',
				esc_html__( '5 Second', 'froday' ) => '5000',
				esc_html__( '6 Second', 'froday' ) => '6000',
				esc_html__( '7 Second', 'froday' ) => '7000',
				esc_html__( '8 Second', 'froday' ) => '8000',
				esc_html__( '9 Second', 'froday' ) => '9000',
				esc_html__( '10 Second', 'froday' ) => '10000',
			),
			'group' => esc_html__('Settings', 'froday'),
		),
		
      ),
   ) );
}
class WPBakeryShortCode_Product_Slider extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Product Category List
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_product_category_list_integrateWithVC' );
function froday_product_category_list_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Product Category List", "froday" ),
      "base" => "taxonomy_list",
	  "category" => "Froday",
      "params" => array(
		
		array(
			'type' => 'vc_link',
			'heading' => esc_html__( 'URL (Link)', 'froday' ),
			'param_name' => 'link',
			'description' => esc_html__( 'Add all categories button.', 'froday' ),
		),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Font Size", "froday"),
            "param_name" => "font_size",
            "description" => esc_html__("Set font size.For Example: 12", "froday"),
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Exclude Categories", "froday"),
            "param_name" => "exclude",
            "description" => esc_html__("Seperate category ids with comma.", "froday"),
        ),
		
      ),
   ) );
}
class WPBakeryShortCode_Product_Category_List extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Image Box
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_image_box_integrateWithVC' );
function froday_image_box_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Image Box", "froday" ),
      "base" => "image_box",
	  "category" => "Froday",
      "params" => array(
		
		array(
			'type' => 'attach_image',
			'heading' => esc_html__( 'Image', 'froday' ),
			'param_name' => 'image_url',
			'description' => esc_html__( 'Upload a image.', 'froday' ),
		),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Title", "froday"),
            "param_name" => "title",
            "description" => esc_html__("Set a title.", "froday"),
			"admin_label" => true,
        ),
		
        array(
            "type" => "textarea",
            "heading" => esc_html__("Content", "froday"),
            "param_name" => "contentm",
            "description" => esc_html__("Set a content.", "froday"),
        ),

		array(
			'type' => 'vc_link',
			'heading' => esc_html__( 'URL (Link)', 'froday' ),
			'param_name' => 'link',
			'description' => esc_html__( 'Set an url for the box', 'froday' ),
		),
		
      ),
   ) );
}
class WPBakeryShortCode_Image_Box extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Latest Products
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_latest_products_integrateWithVC' );
function froday_latest_products_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Latest Products", "froday" ),
      "base" => "latest_products",
	  "category" => "Froday",
      "params" => array(
	  
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Type', 'froday' ),
			'param_name' => 'type',
			'description' => esc_html__( 'Select a type for the products.', 'froday' ),
			'value' => array(
				esc_html__( 'Select Type', 'froday' ) => 'select-type',
				esc_html__( 'Grid', 'froday' ) => 'grid',
				esc_html__( 'List', 'froday' ) => 'list',
			),
		),
	  
		array(
			'type' => 'loop',
			'heading' => esc_html__('Latest Products', 'froday'),
			'param_name' => 'build_query',
			'settings' => array(
				'size' => array('hidden' => false, 'value' => 4 * 3),
				'order_by' => array('value' => 'date'),
				'post_type' => array('value' => 'product', 'hidden' => true),
				'categories' => array('hidden' => true),
				'tags' => array('hidden' => true),
				
			),
			'description' => esc_html__('Create latest products loop.', 'froday')
		),
		
		array(
			'type' => 'checkbox',
			'param_name' => 'activate_pagination',
			'heading' => esc_html__( 'Activate Pagination?', 'froday' ),
			'description' => esc_html__( 'You want to use pagination for the posts?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'yes' ),
		),

		array(
			'type' => 'checkbox',
			'param_name' => 'carousel',
			'heading' => esc_html__( 'Activate Carousel?', 'froday' ),
			'description' => esc_html__( 'You want to use owl carousel?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'yes' ),
			'dependency' => array(
				'element' => 'type',
				'value' => 'grid',
			),		
		),
		  
        array(
            "type" => "textfield",
            "heading" => esc_html__("Autoplay Timeout", "froday"),
            "param_name" => "autoplay_timeout",
            "description" => esc_html__("Set Autoplay timeout.Default: 10000", "froday"),
			'dependency' => array(
				'element' => 'carousel',
				'value' => 'yes',
			),	
        ),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Title", "froday"),
            "param_name" => "title",
            "description" => esc_html__("Set a title.", "froday"),
			"admin_label" => true,
			"group" => 'Header',
        ),
		
		array(
			'type' => 'vc_link',
			'heading' => esc_html__( 'URL (Link)', 'froday' ),
			'param_name' => 'link',
			'description' => esc_html__( 'Add button for the header area.', 'froday' ),
			"group" => 'Header',
		),
		
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Columns', 'froday' ),
			'param_name' => 'column_count',
			'value' => array(
				esc_html__( 'Select Column', 'froday' ) => 'select-column',
				esc_html__( 'Column 2', 'froday' ) => 'col-md-6',						
				esc_html__( 'Column 3', 'froday' ) => 'col-md-4',						
				esc_html__( 'Column 4', 'froday' ) => 'col-md-3',						
			),			
			'description' => esc_html__( 'Set column count for the products.', 'froday' ),
			'group' => 'Columns',
		),

		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Columns Tablet', 'froday' ),
			'param_name' => 'column_count_tablet',
			'value' => array(
				esc_html__( 'Select Column', 'froday' ) => 'select-column',
				esc_html__( 'Column 2', 'froday' ) => 'col-sm-6',						
				esc_html__( 'Column 3', 'froday' ) => 'col-sm-4',						
				esc_html__( 'Column 4', 'froday' ) => 'col-sm-3',						
			),			
			'description' => esc_html__( 'Set column count for tablet view', 'froday' ),
			'group' => 'Columns',
		),

		array(
			'type' => 'checkbox',
			'param_name' => 'translate_enable',
			'heading' => esc_html__( 'Activate Translation?', 'froday' ),
			'description' => esc_html__( 'You want to activate translation fields?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'yes' ),
			'group' => esc_html__('Translate','froday'),
		),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Translate Day", "froday"),
            "param_name" => "translate_day",
            "description" => esc_html__("Translate the text: Day.", "froday"),
			'dependency' => array(
				'element' => 'translate_enable',
				'value' => 'yes',
			),
			'group' => esc_html__('Translate','froday'),
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Translate Days", "froday"),
            "param_name" => "translate_days",
            "description" => esc_html__("Translate the text: Days.", "froday"),
			'dependency' => array(
				'element' => 'translate_enable',
				'value' => 'yes',
			),
			'group' => esc_html__('Translate','froday'),
        ),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Translate Week", "froday"),
            "param_name" => "translate_week",
            "description" => esc_html__("Translate the text: Week.", "froday"),
			'dependency' => array(
				'element' => 'translate_enable',
				'value' => 'yes',
			),
			'group' => esc_html__('Translate','froday'),
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Translate Weeks", "froday"),
            "param_name" => "translate_weeks",
            "description" => esc_html__("Translate the text: Weeks.", "froday"),
			'dependency' => array(
				'element' => 'translate_enable',
				'value' => 'yes',
			),
			'group' => esc_html__('Translate','froday'),
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Translate Expired", "froday"),
            "param_name" => "translate_expired",
            "description" => esc_html__("Translate the text: This offer has expired!.", "froday"),
			'dependency' => array(
				'element' => 'translate_enable',
				'value' => 'yes',
			),
			'group' => esc_html__('Translate','froday'),
        ),
		
      ),
   ) );
}
class WPBakeryShortCode_Latest_Products extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Coupon Carousel
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_coupon_carousel_integrateWithVC' );
function froday_coupon_carousel_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Coupon Carousel", "froday" ),
      "base" => "coupon_carousel",
	  "category" => "Froday",
      "params" => array(
	  
		array(
			'type' => 'loop',
			'heading' => esc_html__('Blog', 'froday'),
			'param_name' => 'build_query',
			'settings' => array(
				'size' => array('hidden' => false, 'value' => 4 * 3),
				'order_by' => array('value' => 'date'),
				'post_type' => array('value' => 'post', 'hidden' => true),
				'tax_query' => array('hidden' => true),
				'tags' => array('hidden' => true),
				
			),
			'description' => esc_html__('Create WordPress loop, to populate content from your site.', 'froday')
		),

		array(
			'type' => 'checkbox',
			'param_name' => 'activate_popup',
			'heading' => esc_html__( 'Activate Popup Screen?', 'froday' ),
			'description' => esc_html__( 'You want to use popup screen for the coupons?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'yes' ),
		),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Autoplay Timeout", "froday"),
            "param_name" => "autoplay_timeout",
            "description" => esc_html__("Set Autoplay timeout.Default: 10000", "froday"),
        ),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Title", "froday"),
            "param_name" => "title",
            "description" => esc_html__("Set a title.", "froday"),
			"admin_label" => true,
			"group" => 'Header',
        ),
		
		array(
			'type' => 'vc_link',
			'heading' => esc_html__( 'URL (Link)', 'froday' ),
			'param_name' => 'link',
			'description' => esc_html__( 'Add button for the header area.', 'froday' ),
			"group" => 'Header',
		),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Expires On", "froday"),
            "param_name" => "translate_expires",
            "description" => esc_html__("Translate the text: Expires On.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Show Code", "froday"),
            "param_name" => "translate_showcode",
            "description" => esc_html__("Translate the text: Show Code.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("OFF", "froday"),
            "param_name" => "translate_off",
            "description" => esc_html__("Translate the text: OFF.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Click Below", "froday"),
            "param_name" => "translate_clickbelow",
            "description" => esc_html__("Translate the text: Click below to get your coupon code.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Image Width", "froday"),
            "param_name" => "image_width",
            "description" => esc_html__("Set Image Width.Default is 223.", "froday"),
			"group"       => 'Image Size',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Image Height", "froday"),
            "param_name" => "image_height",
            "description" => esc_html__("Set Image Height.Default is 148.", "froday"),
			"group"       => 'Image Size',
        ),
		
      ),
   ) );
}
class WPBakeryShortCode_Coupon_Carousel extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Stores Carousel
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_stores_carousel_integrateWithVC' );
function froday_stores_carousel_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Stores Carousel", "froday" ),
      "base" => "stores_carousel",
	  "category" => "Froday",
      "params" => array(
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Autoplay Timeout", "froday"),
            "param_name" => "autoplay_timeout",
            "description" => esc_html__("Set Autoplay timeout.Default: 10000", "froday"),
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Title", "froday"),
            "param_name" => "title",
            "description" => esc_html__("Set a title.", "froday"),
			"admin_label" => true,
			"group" => 'Header',
        ),
		
		array(
			'type' => 'vc_link',
			'heading' => esc_html__( 'URL (Link)', 'froday' ),
			'param_name' => 'link',
			'description' => esc_html__( 'Add button for the header area.', 'froday' ),
			"group" => 'Header',
		),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Count", "froday"),
            "param_name" => "post_count",
            "description" => esc_html__("Add Post Count for example:12", "froday"),
			"group" => 'Header',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Image Width", "froday"),
            "param_name" => "image_width",
            "description" => esc_html__("Set Image Width.Default is 87.", "froday"),
			"group"       => 'Image Size',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Image Height", "froday"),
            "param_name" => "image_height",
            "description" => esc_html__("Set Image Height.Default is 87.", "froday"),
			"group"       => 'Image Size',
        ),
		
      ),
   ) );
}
class WPBakeryShortCode_Store_Carousel extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Stores Grid
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_stores_grid_integrateWithVC' );
function froday_stores_grid_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Stores Grid", "froday" ),
      "base" => "stores_grid",
	  "category" => "Froday",
      "params" => array(
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Title", "froday"),
            "param_name" => "title",
            "description" => esc_html__("Set a title.", "froday"),
			"admin_label" => true,
        ),
		
		
      ),
   ) );
}
class WPBakeryShortCode_Store_Grid extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Latest Blog
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_latest_blog_integrateWithVC' );
function froday_latest_blog_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Latest Posts", "froday" ),
      "base" => "latest_blog",
	  "category" => "Froday",
      "params" => array(
	  
		array(
			'type' => 'loop',
			'heading' => esc_html__('Latest Posts', 'froday'),
			'param_name' => 'build_query',
			'settings' => array(
				'size' => array('hidden' => false, 'value' => 4 * 3),
				'order_by' => array('value' => 'date'),
				'post_type' => array('value' => 'post', 'hidden' => true),
				'tax_query' => array('hidden' => true),
				'tags' => array('hidden' => true),
				
			),
			'description' => esc_html__('Create latest posts loop.', 'froday')
		),
		
		array(
			'type' => 'checkbox',
			'param_name' => 'activate_pagination',
			'heading' => esc_html__( 'Activate Pagination?', 'froday' ),
			'description' => esc_html__( 'You want to use pagination for the posts?', 'froday' ),
			'value' => array( esc_html__( 'Yes', 'froday' ) => 'yes' ),
		),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Excerpt Size", "froday"),
            "param_name" => "excerpt_size",
            "description" => esc_html__("Add Post Excerpt Size for example : 15", "froday"),
        ),
		
        array(
            "type" => "textfield",
            "heading" => esc_html__("Title", "froday"),
            "param_name" => "title",
            "description" => esc_html__("Set a title.", "froday"),
			"admin_label" => true,
			"group" => 'Header',
        ),
		
		array(
			'type' => 'vc_link',
			'heading' => esc_html__( 'URL (Link)', 'froday' ),
			'param_name' => 'link',
			'description' => esc_html__( 'Add button for the header area.', 'froday' ),
			"group" => 'Header',
		),
		
		array(
			'type' => 'dropdown',
			'heading' => esc_html__( 'Columns', 'froday' ),
			'param_name' => 'column_count',
			'value' => array(
				esc_html__( 'Select Column', 'froday' ) => 'select-column',
				esc_html__( 'Column 2', 'froday' ) => 'col-md-6',						
				esc_html__( 'Column 3', 'froday' ) => 'col-md-4',						
				esc_html__( 'Column 4', 'froday' ) => 'col-md-3',						
			),			
			'description' => esc_html__( 'Set column count for the posts.', 'froday' ),
			'group' => 'Columns',
		),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Continue Reading", "froday"),
            "param_name" => "translate_readmore",
            "description" => esc_html__("Translate the text: Continue Reading.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("By", "froday"),
            "param_name" => "translate_by",
            "description" => esc_html__("Translate the text: By:.", "froday"),
			"group"       => 'Translate',
        ),

        array(
            "type" => "textfield",
            "heading" => esc_html__("Comments", "froday"),
            "param_name" => "translate_comments",
            "description" => esc_html__("Translate the text: Comments.", "froday"),
			"group"       => 'Translate',
        ),
		
      ),
   ) );
}
class WPBakeryShortCode_Latest_Blog extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Google Map
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_map_integrateWithVC' );
function froday_map_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Google Map", "froday" ),
      "base" => "map_container",
	  "category" => "Froday",
      "params" => array(

        array(
            "type" => "textfield",
            "heading" => esc_html__("Latitude", "froday"),
            "param_name" => "latitude",
            "description" => esc_html__("Add latitude for google map", "froday")
        ),

        array(
            'type' => 'textfield',
            'heading' => esc_html__( 'Longitude', 'froday' ),
            'param_name' => 'longitude',
            "description" => esc_html__("Add longitude for google map", "froday"),
        ),

        array(
            'type' => 'textfield',
            'heading' => esc_html__( 'Zoom', 'froday' ),
            'param_name' => 'zoom',
            "description" => esc_html__("Adjust zoom for google map", "froday"),
        ),

        array(
            'type' => 'textfield',
            'heading' => esc_html__( 'Height', 'froday' ),
            'param_name' => 'height',
            "description" => esc_html__("Adjust height for google map", "froday"),
        ),

        array(
            'type' => 'css_editor',
            'heading' => esc_html__( 'Css', 'froday' ),
            'param_name' => 'css',
            'group' => esc_html__( 'Design options', 'froday' ),
        ),


      ),
   ) );
}
class WPBakeryShortCode_Map extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Icon List
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_icon_list_integrateWithVC' );
function froday_icon_list_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Icon List", "froday" ),
      "base" => "icon_list",
	  "category" => "Froday",
      "params" => array(

 		array(
			'type' => 'param_group',
			'heading' => esc_html__( 'Icon List', 'froday' ),
			'param_name' => 'values',
			'value' => urlencode( json_encode( array(
				array(
					'title' => esc_html__( 'title here', 'froday' )
				)
			) ) ),
			'params' => array(
				array(
					'type' => 'iconpicker',
					'heading' => esc_html__( 'Icon', 'froday' ),
					'param_name' => 'icon_fontawesome',
					'value' => 'fa fa-info-circle',
					'settings' => array(
						'emptyIcon' => false, // default true, display an "EMPTY" icon?
						'iconsPerPage' => 4000, // default 100, how many icons per/page to display
					),
					'description' => esc_html__( 'Select icon from library.', 'froday' ),
				),
				
				array(
					"type" => "textfield",
					"heading" => esc_html__("Title", "froday"),
					"param_name" => "title",
					"description" => esc_html__("Add title for the icon list.", "froday"),
					'admin_label' => true
				),
				
				array(
					"type" => "textarea",
					"heading" => esc_html__("Content", "froday"),
					"param_name" => "contentm",
					"description" => esc_html__("Add content for the icon list.", "froday")
				),
			
			),
		),	


      ),
   ) );
}
class WPBakeryShortCode_Icon_List extends WPBakeryShortCode {
}

/*-----------------------------------------------------------------------------------*/
/*	Froday Title
/*-----------------------------------------------------------------------------------*/

add_action( 'vc_before_init', 'froday_title_integrateWithVC' );
function froday_title_integrateWithVC() {
   vc_map( array(
      "name" => esc_html__( "Froday Title", "froday" ),
      "base" => "title",
	  "category" => "Froday",
      "params" => array(

		array(
			"type" => "textfield",
			"heading" => esc_html__("Title", "froday"),
			"param_name" => "title",
			"description" => esc_html__("Add title.", "froday")
		),
		
      ),
   ) );
}
class WPBakeryShortCode_Title extends WPBakeryShortCode {
}