示例#1
0
function porto_load_products_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    $order_by_values = porto_vc_woo_order_by();
    $order_way_values = porto_vc_woo_order_way();
    // woocommerce products
    vc_map(array('name' => "Porto " . __('Products', 'js_composer'), 'base' => 'porto_products', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Show multiple products by ID or SKU.', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto'), 'param_name' => 'view', 'value' => porto_vc_commons('products_view_mode'), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Columns', 'porto'), 'param_name' => 'columns', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'std' => '4', 'value' => porto_vc_commons('products_columns')), array('type' => 'dropdown', 'heading' => __('Column Width', 'porto'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => $order_by_values, 'description' => sprintf(__('Select how to sort retrieved products. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => $order_way_values, 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'autocomplete', 'heading' => __('Products', 'js_composer'), 'param_name' => 'ids', 'settings' => array('multiple' => true, 'sortable' => true, 'unique_values' => true), 'description' => __('Enter List of Products', 'js_composer')), array('type' => 'hidden', 'param_name' => 'skus'), array('type' => 'dropdown', 'heading' => __('Add Links Position', 'porto'), 'desc' => 'Select position of add to cart, add to wishlist, quickview.', 'param_name' => 'addlinks_pos', 'value' => porto_vc_commons('products_addlinks_pos')), array('type' => 'checkbox', 'heading' => __('Show Navigation', 'porto'), 'param_name' => 'navigation', 'std' => 'yes', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Pagination', 'porto'), 'param_name' => 'pagination', 'std' => 'no', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    //Filters For autocomplete param:
    //For suggestion: vc_autocomplete_[shortcode_name]_[param_name]_callback
    add_filter('vc_autocomplete_porto_products_ids_callback', 'porto_shortcode_products_ids_callback', 10, 1);
    // Get suggestion(find). Must return an array
    add_filter('vc_autocomplete_porto_products_ids_render', 'porto_shortcode_products_ids_render', 10, 1);
    // Render exact product. Must return an array (label,value)
    //For param: ID default value filter
    add_filter('vc_form_fields_render_field_porto_products_ids_param_value', 'porto_shortcode_products_ids_param_value', 10, 4);
    // Defines default value for param if not provided. Takes from other param value.
    if (!class_exists('WPBakeryShortCode_Porto_Products')) {
        class WPBakeryShortCode_Porto_Products extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_testimonial_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array('name' => "Porto " . __('Testimonial', 'porto-shortcodes'), 'base' => 'porto_testimonial', 'category' => __('Porto', 'porto-shortcodes'), 'icon' => 'porto_vc_testimonial', 'weight' => -50, 'params' => array(array('type' => 'textfield', 'heading' => __('Name', 'porto-shortcodes'), 'param_name' => 'name', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Role', 'porto-shortcodes'), 'param_name' => 'role', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Company', 'porto-shortcodes'), 'param_name' => 'company', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Author Link', 'porto-shortcodes'), 'param_name' => 'author_url', 'admin_label' => true), array('type' => 'label', 'heading' => __('Input Photo URL or Select Photo.', 'porto-shortcodes'), 'param_name' => 'label'), array('type' => 'textfield', 'heading' => __('Photo URL', 'porto-shortcodes'), 'param_name' => 'photo_url'), array('type' => 'attach_image', 'heading' => __('Photo', 'porto-shortcodes'), 'param_name' => 'photo_id'), array('type' => 'textarea_html', 'heading' => __('Quote', 'porto-shortcodes'), 'param_name' => 'content', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View Type', 'porto-shortcodes'), 'param_name' => 'view', 'value' => array(__('Default', 'porto-shortcodes') => 'default', __('Simple', 'porto-shortcodes') => 'simple', __('Transparent', 'porto-shortcodes') => 'transparent'), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Style Type', 'porto-shortcodes'), 'param_name' => 'style', 'std' => '', 'value' => porto_vc_commons('testimonial_styles'), 'dependency' => array('element' => 'view', 'value' => array('default', 'transparent')), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto-shortcodes'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'style', 'value' => array('')), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto-shortcodes'), 'param_name' => 'color', 'value' => array(__('Normal', 'porto-shortcodes') => '', __('White', 'porto-shortcodes') => 'white'), 'dependency' => array('element' => 'view', 'value' => array('transparent', 'simple'))), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Testimonial')) {
        class WPBakeryShortCode_Porto_Testimonial extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_content_box_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array("name" => "Porto " . __("Content Box", 'porto-shortcodes'), "base" => "porto_content_box", "category" => __("Porto", 'porto-shortcodes'), "icon" => "porto_vc_content_box", 'is_container' => true, 'weight' => -50, 'js_view' => 'VcColumnView', "params" => array(array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto-shortcodes'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'admin_label' => true), array('type' => 'colorpicker', 'heading' => __('Border Top Color', 'porto-shortcodes'), 'param_name' => 'border_top_color', 'dependency' => array('element' => 'skin', 'value' => array('custom')), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Border Radius', 'porto-shortcodes'), 'param_name' => 'border_radius', 'description' => __('Enter the border radius in px.', 'porto-shortcodes'), 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'textfield', 'heading' => __('Border Top Width', 'porto-shortcodes'), 'param_name' => 'border_top_width', 'description' => __('Enter the border top width in px.', 'porto-shortcodes'), 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'dropdown', 'heading' => __('Background Type', 'porto-shortcodes'), 'param_name' => 'bg_type', 'value' => porto_vc_commons('content_boxes_bg_type'), 'admin_label' => true), array('type' => 'colorpicker', 'heading' => __('Background Gradient Top Color', 'porto-shortcodes'), 'param_name' => 'bg_top_color', 'dependency' => array('element' => 'bg_type', 'value' => array('featured-boxes-custom'))), array('type' => 'colorpicker', 'heading' => __('Background Gradient Bottom Color', 'porto-shortcodes'), 'param_name' => 'bg_bottom_color', 'dependency' => array('element' => 'bg_type', 'value' => array('featured-boxes-custom'))), array("type" => "dropdown", "heading" => __("Text Align", 'porto-shortcodes'), "param_name" => "align", "value" => porto_vc_commons('align')), array('type' => 'dropdown', 'heading' => __('Style', 'porto-shortcodes'), 'param_name' => 'box_style', 'value' => porto_vc_commons('content_boxes_style'), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Effect', 'porto-shortcodes'), 'param_name' => 'box_effect', 'value' => porto_vc_commons('content_box_effect'), 'admin_label' => true), array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto-shortcodes'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'description' => ''), array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto-shortcodes'), 'param_name' => 'icon', 'dependency' => array('element' => 'show_icon', 'not_empty' => true)), array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto-shortcodes'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto-shortcodes'), 'param_name' => 'icon_bg_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto-shortcodes'), 'param_name' => 'icon_border_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto-shortcodes'), 'param_name' => 'icon_wrap_border_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Box Shadow Color', 'porto-shortcodes'), 'param_name' => 'icon_shadow_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Hover Color', 'porto-shortcodes'), 'param_name' => 'icon_hcolor', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Hover Background Color', 'porto-shortcodes'), 'param_name' => 'icon_hbg_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Hover Border Color', 'porto-shortcodes'), 'param_name' => 'icon_hborder_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Wrap Hover Border Color', 'porto-shortcodes'), 'param_name' => 'icon_wrap_hborder_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), array('type' => 'colorpicker', 'heading' => __('Icon Hover Box Shadow Color', 'porto-shortcodes'), 'param_name' => 'icon_hshadow_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Content_Box')) {
        class WPBakeryShortCode_Porto_Content_Box extends WPBakeryShortCodesContainer
        {
        }
    }
}
示例#4
0
function porto_load_content_box_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array("name" => "Porto " . __("Content Box", 'porto'), "base" => "porto_content_box", "category" => __("Porto", 'porto'), "icon" => "porto_vc_content_box", 'is_container' => true, 'weight' => -50, "show_settings_on_create" => false, 'js_view' => 'VcColumnView', "params" => array(array('type' => 'colorpicker', 'heading' => __('Border Top Color', 'porto'), 'param_name' => 'border_top_color', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Border Radius', 'porto'), 'param_name' => 'border_radius', 'description' => __('Enter the border radius in px.', 'porto')), array('type' => 'textfield', 'heading' => __('Border Top Width', 'porto'), 'param_name' => 'border_top_width', 'description' => __('Enter the border top width in px.', 'porto')), array('type' => 'colorpicker', 'heading' => __('Background Gradient Top Color', 'porto'), 'param_name' => 'bg_top_color'), array('type' => 'colorpicker', 'heading' => __('Background Gradient Bottom Color', 'porto'), 'param_name' => 'bg_bottom_color'), array("type" => "dropdown", "heading" => __("Text Align", "porto"), "param_name" => "align", "value" => porto_vc_commons('align')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Content_Box')) {
        class WPBakeryShortCode_Porto_Content_Box extends WPBakeryShortCodesContainer
        {
        }
    }
}
function porto_load_portfolios_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array('name' => "Porto " . __('Portfolios', 'porto-shortcodes'), 'base' => 'porto_portfolios', 'category' => __('Porto', 'porto-shortcodes'), 'icon' => 'porto_vc_portfolios', 'weight' => -50, "params" => array(array("type" => "textfield", "heading" => __("Title", 'porto-shortcodes'), "param_name" => "title", "admin_label" => true), array("type" => "dropdown", "heading" => __("Portfolio Layout", 'porto-shortcodes'), "param_name" => "portfolio_layout", 'std' => 'timeline', "value" => porto_vc_commons('portfolio_layout'), "admin_label" => true), array("type" => "dropdown", "heading" => __("View Type", 'porto-shortcodes'), "param_name" => "view", 'dependency' => array('element' => 'portfolio_layout', 'value' => array('grid')), 'std' => '', "value" => porto_vc_commons('portfolio_grid_view')), array("type" => "dropdown", "heading" => __("Columns", 'porto-shortcodes'), "param_name" => "columns", 'dependency' => array('element' => 'portfolio_layout', 'value' => array('grid')), 'std' => '3', "value" => porto_vc_commons('portfolio_grid_columns')), array("type" => "textfield", "heading" => __("Category IDs", 'porto-shortcodes'), "description" => __("comma separated list of category ids", 'porto-shortcodes'), "param_name" => "cats", "admin_label" => true), array("type" => "textfield", "heading" => __("Portfolio IDs", 'porto-shortcodes'), "description" => __("comma separated list of portfolio ids", 'porto-shortcodes'), "param_name" => "post_in"), array("type" => "textfield", "heading" => __("Portfolios Count", 'porto-shortcodes'), "param_name" => "number", "value" => '8'), array('type' => 'checkbox', 'heading' => __("Show View More", 'porto-shortcodes'), 'param_name' => 'view_more', 'std' => 'no', 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Portfolios')) {
        class WPBakeryShortCode_Porto_Portfolios extends WPBakeryShortCode
        {
        }
    }
}
示例#6
0
function porto_load_toggles_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array("name" => "Porto " . __("Toggles", 'porto-shortcodes'), "base" => "porto_toggles", "category" => __("Porto", 'porto-shortcodes'), "icon" => "porto_vc_toggles", 'is_container' => true, 'weight' => -50, 'js_view' => 'VcColumnView', "as_parent" => array('only' => 'vc_toggle'), "params" => array(array('type' => 'dropdown', 'heading' => __('Type', 'porto-shortcodes'), 'param_name' => 'type', 'value' => porto_vc_commons('toggle_type')), array('type' => 'dropdown', 'heading' => __('Size', 'porto-shortcodes'), 'param_name' => 'size', 'value' => porto_vc_commons('toggle_size')), array('type' => 'checkbox', 'heading' => __('One toggle open at a time', 'porto-shortcodes'), 'param_name' => 'one_toggle', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'description' => ''), array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto-shortcodes'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'admin_label' => true), array('type' => 'colorpicker', 'heading' => __('Color', 'porto-shortcodes'), 'param_name' => 'color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Toggles')) {
        class WPBakeryShortCode_Porto_Toggles extends WPBakeryShortCodesContainer
        {
        }
    }
}
示例#7
0
function porto_load_tooltip_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array('name' => "Porto " . __('Tooltip', 'porto-shortcodes'), 'base' => 'porto_tooltip', 'category' => __('Porto', 'porto-shortcodes'), 'icon' => 'porto_vc_tooltip', 'weight' => -50, 'params' => array(array('type' => 'textfield', 'heading' => __('Prefix', 'porto-shortcodes'), 'param_name' => 'prefix'), array('type' => 'textfield', 'heading' => __('Text', 'porto-shortcodes'), 'param_name' => 'text', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Suffix', 'porto-shortcodes'), 'param_name' => 'suffix'), array('type' => 'dropdown', 'heading' => __('Display Type', 'porto-shortcodes'), 'param_name' => 'display', 'value' => array(__('Inline', 'porto-shortcodes') => '', __('Block', 'porto-shortcodes') => 'block')), array('type' => 'dropdown', 'heading' => __('Text Type', 'porto-shortcodes'), 'param_name' => 'type', 'value' => array(__('Link', 'porto-shortcodes') => '', __('Button Link', 'porto-shortcodes') => 'btn-link', __('Button', 'porto-shortcodes') => 'btn')), array("type" => "textfield", "heading" => __("Link", 'porto-shortcodes'), "param_name" => "link", 'dependency' => array('element' => 'type', 'value' => array('', 'btn-link'))), array('type' => 'dropdown', 'heading' => __('Button Size', 'porto-shortcodes'), 'param_name' => 'btn_size', 'value' => porto_vc_commons('size'), 'dependency' => array('element' => 'type', 'value' => array('btn', 'btn-link'))), array('type' => 'dropdown', 'heading' => __('Button Skin Color', 'porto-shortcodes'), 'param_name' => 'btn_skin', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'type', 'value' => array('btn', 'btn-link'))), array('type' => 'dropdown', 'heading' => __('Button Contextual Class', 'porto-shortcodes'), 'param_name' => 'btn_context', 'value' => porto_vc_commons('contextual'), 'dependency' => array('element' => 'type', 'value' => array('btn', 'btn-link'))), array('type' => 'textfield', 'heading' => __('Tooltip Text', 'porto-shortcodes'), 'param_name' => 'tooltip_text', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Tooltip Position', 'porto-shortcodes'), 'param_name' => 'tooltip_position', 'value' => porto_vc_commons('position')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Tooltip')) {
        class WPBakeryShortCode_Porto_Tooltip extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_blockquote_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array('name' => "Porto " . __('Blockquote', 'porto-shortcodes'), 'base' => 'porto_blockquote', 'category' => __('Porto', 'porto-shortcodes'), 'icon' => 'porto_vc_blockquote', 'weight' => -50, 'params' => array(array('type' => 'textarea_html', 'heading' => __('Quote', 'porto-shortcodes'), 'param_name' => 'content', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Footer Text 1', 'porto-shortcodes'), 'param_name' => 'footer_before'), array('type' => 'textfield', 'heading' => __('Footer Text 2', 'porto-shortcodes'), 'param_name' => 'footer_after'), array('type' => 'dropdown', 'heading' => __('View Type', 'porto-shortcodes'), 'param_name' => 'view', 'value' => array(__('Default', 'porto-shortcodes') => '', __('With Borders', 'porto-shortcodes') => 'with-borders')), array('type' => 'dropdown', 'heading' => __('Direction', 'porto-shortcodes'), 'param_name' => 'dir', 'value' => array(__('Default', 'porto-shortcodes') => '', __('Reverse', 'porto-shortcodes') => 'blockquote-reverse')), array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto-shortcodes'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'view', 'value' => array(''))), array('type' => 'colorpicker', 'heading' => __('Border Color', 'porto-shortcodes'), 'param_name' => 'color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Blockquote')) {
        class WPBakeryShortCode_Porto_Blockquote extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_best_selling_products_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    // woocommerce best selling products
    vc_map(array('name' => "Porto " . __('Best Selling Products', 'js_composer'), 'base' => 'porto_best_selling_products', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Show best selling products on sale', 'porto-shortcodes'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto-shortcodes'), 'param_name' => 'view', 'value' => porto_vc_commons('products_view_mode'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Per page', 'js_composer'), 'value' => 12, 'param_name' => 'per_page', 'description' => __('The "per_page" shortcode determines how many products to show on the page', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns', 'porto-shortcodes'), 'param_name' => 'columns', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'std' => '4', 'value' => porto_vc_commons('products_columns')), array('type' => 'dropdown', 'heading' => __('Column Width', 'porto-shortcodes'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'dropdown', 'heading' => __('Add Links Position', 'porto-shortcodes'), 'desc' => 'Select position of add to cart, add to wishlist, quickview.', 'param_name' => 'addlinks_pos', 'value' => porto_vc_commons('products_addlinks_pos')), array('type' => 'checkbox', 'heading' => __('Show Navigation', 'porto-shortcodes'), 'param_name' => 'navigation', 'std' => 'yes', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Pagination', 'porto-shortcodes'), 'param_name' => 'pagination', 'std' => 'no', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Best_Selling_Products')) {
        class WPBakeryShortCode_Porto_Best_Selling_Products extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_sale_products_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    $order_by_values = porto_vc_woo_order_by();
    $order_way_values = porto_vc_woo_order_way();
    // woocommerce sale products
    vc_map(array('name' => "Porto " . __('Sale products', 'js_composer'), 'base' => 'porto_sale_products', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Show all products on sale', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto'), 'param_name' => 'view', 'value' => porto_vc_commons('products_view_mode'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Per page', 'js_composer'), 'value' => 12, 'param_name' => 'per_page', 'description' => __('The "per_page" shortcode determines how many products to show on the page', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns', 'porto'), 'param_name' => 'columns', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'std' => '4', 'value' => porto_vc_commons('products_columns')), array('type' => 'dropdown', 'heading' => __('Column Width', 'porto'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => $order_by_values, 'description' => sprintf(__('Select how to sort retrieved products. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => $order_way_values, 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Add Links Position', 'porto'), 'desc' => 'Select position of add to cart, add to wishlist, quickview.', 'param_name' => 'addlinks_pos', 'value' => porto_vc_commons('products_addlinks_pos')), array('type' => 'checkbox', 'heading' => __('Show Navigation', 'porto'), 'param_name' => 'navigation', 'std' => 'yes', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Pagination', 'porto'), 'param_name' => 'pagination', 'std' => 'no', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Sale_Products')) {
        class WPBakeryShortCode_Porto_Sale_Products extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_product_category_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    $order_by_values = porto_vc_woo_order_by();
    $order_way_values = porto_vc_woo_order_way();
    $args = array('type' => 'post', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => 'product_cat', 'pad_counts' => false);
    $categories = get_categories($args);
    $product_categories_dropdown = array();
    $vc_vendor_wc = new Vc_Vendor_Woocommerce();
    $vc_vendor_wc->getCategoryChilds(0, 0, $categories, 0, $product_categories_dropdown);
    // woocommerce product category
    vc_map(array('name' => "Porto " . __('Product category', 'js_composer'), 'base' => 'porto_product_category', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Show multiple products in a category', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto'), 'param_name' => 'view', 'value' => porto_vc_commons('products_view_mode'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Per page', 'js_composer'), 'value' => 12, 'param_name' => 'per_page', 'description' => __('The "per_page" shortcode determines how many products to show on the page', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns', 'porto'), 'param_name' => 'columns', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'std' => '4', 'value' => porto_vc_commons('products_columns')), array('type' => 'dropdown', 'heading' => __('Column Width', 'porto'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => $order_by_values, 'description' => sprintf(__('Select how to sort retrieved products. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => $order_way_values, 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Category', 'js_composer'), 'value' => $product_categories_dropdown, 'param_name' => 'category', 'description' => __('Product category list', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Add Links Position', 'porto'), 'desc' => 'Select position of add to cart, add to wishlist, quickview.', 'param_name' => 'addlinks_pos', 'value' => porto_vc_commons('products_addlinks_pos')), array('type' => 'checkbox', 'heading' => __('Show Navigation', 'porto'), 'param_name' => 'navigation', 'std' => 'yes', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Pagination', 'porto'), 'param_name' => 'pagination', 'std' => 'no', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    if (!class_exists('WPBakeryShortCode_Porto_Product_Category')) {
        class WPBakeryShortCode_Porto_Product_Category extends WPBakeryShortCode
        {
        }
    }
}
function porto_load_product_categories_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    $order_by_values = porto_vc_woo_order_by();
    $order_way_values = porto_vc_woo_order_way();
    // woocommerce product categories
    vc_map(array('name' => "Porto " . __('Product Categories', 'js_composer'), 'base' => 'porto_product_categories', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Display product categories loop', 'porto-shortcodes'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto-shortcodes'), 'param_name' => 'view', 'value' => array(__('Grid', 'porto-shortcodes') => 'grid', __('Slider', 'porto-shortcodes') => 'products-slider'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Number', 'js_composer'), 'param_name' => 'number', 'description' => __('The `number` field is used to display the number of products.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns', 'porto-shortcodes'), 'param_name' => 'columns', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'std' => '4', 'value' => porto_vc_commons('products_columns')), array('type' => 'dropdown', 'heading' => __('Column Width', 'porto-shortcodes'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => $order_by_values, 'description' => sprintf(__('Select how to sort retrieved products. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => $order_way_values, 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'textfield', 'heading' => __('Number', 'js_composer'), 'param_name' => 'hide_empty', 'description' => __('Hide empty', 'js_composer')), array('type' => 'autocomplete', 'heading' => __('Categories', 'js_composer'), 'param_name' => 'ids', 'settings' => array('multiple' => true, 'sortable' => true), 'description' => __('List of product categories', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Hide products count', 'porto-shortcodes'), 'param_name' => 'hide_count', 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Navigation', 'porto-shortcodes'), 'param_name' => 'navigation', 'std' => 'yes', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Pagination', 'porto-shortcodes'), 'param_name' => 'pagination', 'std' => 'no', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    //Filters For autocomplete param:
    //For suggestion: vc_autocomplete_[shortcode_name]_[param_name]_callback
    add_filter('vc_autocomplete_porto_product_categories_ids_callback', 'porto_shortcode_product_categories_ids_callback', 10, 1);
    // Get suggestion(find). Must return an array
    add_filter('vc_autocomplete_porto_product_categories_ids_render', 'porto_shortcode_product_categories_ids_render', 10, 1);
    // Render exact category by id. Must return an array (label,value)
    if (!class_exists('WPBakeryShortCode_Porto_Product_Categories')) {
        class WPBakeryShortCode_Porto_Product_Categories extends WPBakeryShortCode
        {
        }
    }
}
示例#13
0
function porto_load_product_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    vc_map(array('name' => "Porto " . __('Product', 'js_composer'), 'base' => 'porto_product', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Show a single product by ID or SKU', 'porto-shortcodes'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto-shortcodes'), 'param_name' => 'view', 'value' => porto_vc_commons('product_view_mode'), 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('Width', 'porto-shortcodes'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'autocomplete', 'heading' => __('Select identificator', 'js_composer'), 'param_name' => 'id', 'description' => __('Input product ID or product SKU or product title to see suggestions', 'js_composer'), 'admin_label' => true), array('type' => 'hidden', 'param_name' => 'sku'), array('type' => 'dropdown', 'heading' => __('Add Links Position', 'porto-shortcodes'), 'desc' => 'Select position of add to cart, add to wishlist, quickview.', 'param_name' => 'addlinks_pos', 'value' => porto_vc_commons('products_addlinks_pos')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    //Filters For autocomplete param:
    //For suggestion: vc_autocomplete_[shortcode_name]_[param_name]_callback
    add_filter('vc_autocomplete_porto_product_id_callback', 'porto_shortcode_product_id_callback', 10, 1);
    // Get suggestion(find). Must return an array
    add_filter('vc_autocomplete_porto_product_id_render', 'porto_shortcode_product_id_render', 10, 1);
    // Render exact product. Must return an array (label,value)
    //For param: ID default value filter
    add_filter('vc_form_fields_render_field_porto_product_id_param_value', 'porto_shortcode_product_id_param_value', 10, 4);
    // Defines default value for param if not provided. Takes from other param value.
    if (!class_exists('WPBakeryShortCode_Porto_Product')) {
        class WPBakeryShortCode_Porto_Product extends WPBakeryShortCode
        {
        }
    }
}
示例#14
0
function porto_load_shortcodes()
{
    if (function_exists('vc_map')) {
        /* ---------------------------- */
        /* Customize Tabs, Tab
           /* ---------------------------- */
        vc_remove_param('vc_tabs', 'interval');
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Position', 'porto'), 'param_name' => 'position', 'value' => porto_vc_commons('tabs'), 'description' => __('Select the position of the tab header.', 'porto'), 'admin_label' => true));
        vc_add_param('vc_tab', array('type' => 'textfield', 'heading' => __('Font Awesome Icon or Icon Class', 'porto'), 'param_name' => 'icon', 'description' => __('Input font awesome icon or icon class. You can see <a target="_blank" href="http://fortawesome.github.io/Font-Awesome/icons/">Font Awesome Icons in here</a>.', 'porto')));
        /* ---------------------------- */
        /* Customize Tour
           /* ---------------------------- */
        vc_remove_param('vc_tour', 'interval');
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Position', 'porto'), 'param_name' => 'position', 'value' => porto_vc_commons('tour'), 'description' => __('Select the position of the tab header.', 'porto'), 'admin_label' => true));
        /* ---------------------------- */
        /* Customize Separator
           /* ---------------------------- */
        vc_add_param('vc_separator', array('type' => 'checkbox', 'heading' => __('Show Gradient', 'porto'), 'param_name' => 'gradient', 'std' => 'yes', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Gap Size', 'porto'), 'param_name' => 'gap', 'value' => porto_vc_commons('separator')));
        /* ---------------------------- */
        /* Customize Text Separator
           /* ---------------------------- */
        vc_add_param('vc_text_separator', array('type' => 'checkbox', 'heading' => __('Show Gradient', 'porto'), 'param_name' => 'gradient', 'std' => 'yes', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        /* ---------------------------- */
        /* Customize Accordion
           /* ---------------------------- */
        vc_remove_param('vc_accordion', 'disable_keyboard');
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('accordion')));
        vc_add_param('vc_accordion_tab', array('type' => 'textfield', 'heading' => __('Font Awesome Icon or Icon Class', 'porto'), 'param_name' => 'icon', 'description' => __('Input font awesome icon or icon class. You can see <a target="_blank" href="http://fortawesome.github.io/Font-Awesome/icons/">Font Awesome Icons in here</a>.', 'porto')));
        /* ---------------------------- */
        /* Customize Toggle
           /* ---------------------------- */
        vc_remove_param('vc_toggle', 'style');
        vc_remove_param('vc_toggle', 'color');
        vc_remove_param('vc_toggle', 'size');
        vc_add_param('vc_toggle', array('type' => 'checkbox', 'heading' => __('Hide Toggle Icon', 'porto'), 'param_name' => 'hide_toggle', 'value' => array(__('Hide toggle icon.', 'porto') => 'true'), 'description' => ''));
        vc_add_param('vc_toggle', array('type' => 'checkbox', 'heading' => __('View Option', 'porto'), 'param_name' => 'one_toggle', 'value' => array(__('Hide this toggle when open another toggle.', 'porto') => 'true'), 'description' => ''));
        vc_add_param('vc_toggle', array('type' => 'textfield', 'heading' => __('Font Awesome Icon or Icon Class', 'porto'), 'param_name' => 'icon', 'description' => __('Input font awesome icon or icon class. You can see <a target="_blank" href="http://fortawesome.github.io/Font-Awesome/icons/">Font Awesome Icons in here</a>.', 'porto')));
        /* ---------------------------- */
        /* Customize Buttons
           /* ---------------------------- */
        vc_add_param('vc_button', array('type' => 'checkbox', 'heading' => __('Disable', 'porto'), 'param_name' => 'disabled', 'value' => array(__('Disable button.', 'porto') => true)));
        vc_add_param('vc_button', array('type' => 'checkbox', 'heading' => __('Show as Label', 'porto'), 'param_name' => 'label', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        /* ---------------------------- */
        /* Add Single Image Parameters
           /* ---------------------------- */
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('LightBox', 'porto'), 'param_name' => 'lightbox', 'value' => array(__('Yes, please', 'js_composer') => true), 'dependency' => array('element' => 'img_link_large', 'not_empty' => true), 'description' => __('Check it if you want to link to the lightbox with the large image.', 'porto')));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show Zoom Icon', 'porto'), 'param_name' => 'zoom_icon', 'value' => array(__('Yes, please', 'js_composer') => true), 'dependency' => array('element' => 'img_link_large', 'not_empty' => true)));
        /* ---------------------------- */
        /* Customize Pie Chart
           /* ---------------------------- */
        vc_remove_param('vc_pie', 'color');
        // Used in 'Button', 'Call __( 'Blue', 'js_composer' )to Action', 'Pie chart' blocks
        $colors_arr = array(__('Grey', 'js_composer') => 'wpb_button', __('Blue', 'js_composer') => 'btn-primary', __('Turquoise', 'js_composer') => 'btn-info', __('Green', 'js_composer') => 'btn-success', __('Orange', 'js_composer') => 'btn-warning', __('Red', 'js_composer') => 'btn-danger', __('Black', 'js_composer') => 'btn-inverse');
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => array(__('Custom', 'porto') => 'custom', __('Default', 'porto') => 'default'), 'description' => __('Select pie chart type.', 'porto'), 'admin_label' => true));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Bar color (default)', 'porto'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Select pie chart color.', 'js_composer'), 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('default')), 'param_holder_class' => 'vc_colored-dropdown'));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Size', 'porto'), 'param_name' => 'size', 'std' => 175, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the size of the chart in px.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Track Color', 'porto'), 'param_name' => 'trackcolor', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose the color of the track. Please clear this if you want to use the default color.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Bar color (custom)', 'porto'), 'param_name' => 'barcolor', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Select pie chart color. Please clear this if you want to use the default color.', 'porto'), 'admin_label' => true));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Animation Speed', 'porto'), 'param_name' => 'speed', 'std' => 2500, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the animation speed in milliseconds.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Line Width', 'porto'), 'param_name' => 'line', 'std' => 14, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the width of the line bar in px.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Line Cap', 'porto'), 'param_name' => 'linecap', 'value' => array(__('Round', 'porto') => 'round', __('Square', 'porto') => 'square'), 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose how the ending of the bar line looks like.', 'porto')));
    }
}
示例#15
0
function porto_load_shortcodes()
{
    if (function_exists('vc_map')) {
        global $porto_settings;
        $dark = isset($porto_settings['css-type']) && $porto_settings['css-type'] == 'dark' ? true : false;
        /* ---------------------------- */
        /* Customize Row
           /* ---------------------------- */
        $section_group = __('Section', 'porto');
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section & Parallax Text Color', 'porto'), 'param_name' => 'section_text_color', 'value' => porto_vc_commons('section_text_color')));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Text Align', 'porto'), 'param_name' => 'text_align', 'value' => porto_vc_commons('align')));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Is Section?', 'porto'), 'param_name' => 'is_section', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section Skin Color', 'porto'), 'param_name' => 'section_skin', 'value' => porto_vc_commons('section_skin'), 'dependency' => array('element' => 'parallax', 'value' => array('')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section Default Color Scale', 'porto'), 'param_name' => 'section_color_scale', 'value' => porto_vc_commons('section_color_scale'), 'dependency' => array('element' => 'section_skin', 'value' => array('default')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Margin Top', 'porto'), 'param_name' => 'remove_margin_top', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Margin Bottom', 'porto'), 'param_name' => 'remove_margin_bottom', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Show Divider', 'porto'), 'param_name' => 'show_divider', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'is_section', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Divider Position', 'porto'), 'param_name' => 'divider_pos', 'value' => array(__('Top', 'porto') => '', __('Bottom', 'porto') => 'bottom'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Divider Color', 'porto'), 'param_name' => 'divider_color', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Divider Height', 'porto'), 'param_name' => 'divider_height', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto'), 'param_name' => 'show_divider_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'divider_icon', 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'divider_icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'divider_icon_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'divider_icon_bg_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'divider_icon_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'divider_icon_wrap_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'divider_icon_style', 'value' => porto_vc_commons('separator_icon_style'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Position', 'porto'), 'param_name' => 'divider_icon_pos', 'value' => porto_vc_commons('separator_icon_pos'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Size', 'porto'), 'param_name' => 'divider_icon_size', 'value' => porto_vc_commons('separator_icon_size'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Column
           /* ---------------------------- */
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section & Parallax Text Color', 'porto'), 'param_name' => 'section_text_color', 'value' => porto_vc_commons('section_text_color')));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Text Align', 'porto'), 'param_name' => 'text_align', 'value' => porto_vc_commons('align')));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Is Section?', 'porto'), 'param_name' => 'is_section', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section Skin Color', 'porto'), 'param_name' => 'section_skin', 'value' => porto_vc_commons('section_skin'), 'dependency' => array('element' => 'parallax', 'value' => array('')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section Default Scale Color', 'porto'), 'param_name' => 'section_color_scale', 'value' => porto_vc_commons('section_color_scale'), 'dependency' => array('element' => 'section_skin', 'value' => array('default')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Margin Top', 'porto'), 'param_name' => 'remove_margin_top', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Margin Bottom', 'porto'), 'param_name' => 'remove_margin_bottom', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Show Divider', 'porto'), 'param_name' => 'show_divider', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'is_section', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Divider Position', 'porto'), 'param_name' => 'divider_pos', 'value' => array(__('Top', 'porto') => '', __('Bottom', 'porto') => 'bottom'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Divider Color', 'porto'), 'param_name' => 'divider_color', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'textfield', 'heading' => __('Divider Height', 'porto'), 'param_name' => 'divider_height', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto'), 'param_name' => 'show_divider_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'divider_icon', 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'divider_icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'divider_icon_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'divider_icon_bg_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'divider_icon_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'divider_icon_wrap_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'divider_icon_style', 'value' => porto_vc_commons('separator_icon_style'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Position', 'porto'), 'param_name' => 'divider_icon_pos', 'value' => porto_vc_commons('separator_icon_pos'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Size', 'porto'), 'param_name' => 'divider_icon_size', 'value' => porto_vc_commons('separator_icon_size'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Custom Heading
           /* ---------------------------- */
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors')));
        vc_add_param('vc_custom_heading', array('type' => 'checkbox', 'heading' => __('Show Border', 'porto'), 'param_name' => 'show_border', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Border Skin Color', 'porto'), 'param_name' => 'border_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_border', 'not_empty' => true)));
        vc_add_param('vc_custom_heading', array('type' => 'colorpicker', 'heading' => __('Border Color', 'porto'), 'param_name' => 'border_color', 'dependency' => array('element' => 'border_skin', 'value' => array('custom'))));
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Border Type', 'porto'), 'param_name' => 'border_type', 'value' => porto_vc_commons('heading_border_type'), 'dependency' => array('element' => 'show_border', 'not_empty' => true)));
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Border Size', 'porto'), 'param_name' => 'border_size', 'value' => porto_vc_commons('heading_border_size'), 'dependency' => array('element' => 'show_border', 'not_empty' => true)));
        /* ---------------------------- */
        /* Customize Tabs, Tab
           /* ---------------------------- */
        vc_remove_param('vc_tabs', 'interval');
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Position', 'porto'), 'param_name' => 'position', 'value' => porto_vc_commons('tabs'), 'description' => __('Select the position of the tab header.', 'porto'), 'admin_label' => true));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'admin_label' => true));
        vc_add_param('vc_tabs', array('type' => 'colorpicker', 'heading' => __('Color', 'porto'), 'param_name' => 'color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('tabs_type'), 'admin_label' => true));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'icon_style', 'value' => porto_vc_commons('tabs_icon_style'), 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('tabs-simple'))));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Icon Effect', 'porto'), 'param_name' => 'icon_effect', 'value' => porto_vc_commons('tabs_icon_effect'), 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('tabs-simple'))));
        vc_add_param('vc_tab', array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_tab', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_tab', array('type' => 'label', 'heading' => __('Please configure the following options when Tabs Type is Simple.', 'porto'), 'param_name' => 'label'));
        vc_add_param('vc_tab', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'icon_bg_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'icon_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'icon_wrap_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Box Shadow Color', 'porto'), 'param_name' => 'icon_shadow_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Color', 'porto'), 'param_name' => 'icon_hcolor', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Background Color', 'porto'), 'param_name' => 'icon_hbg_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Border Color', 'porto'), 'param_name' => 'icon_hborder_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Hover Border Color', 'porto'), 'param_name' => 'icon_wrap_hborder_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Box Shadow Color', 'porto'), 'param_name' => 'icon_hshadow_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        /* ---------------------------- */
        /* Customize Tour
           /* ---------------------------- */
        vc_remove_param('vc_tour', 'interval');
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Position', 'porto'), 'param_name' => 'position', 'value' => porto_vc_commons('tour'), 'description' => __('Select the position of the tab header.', 'porto'), 'admin_label' => true));
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'admin_label' => true));
        vc_add_param('vc_tour', array('type' => 'colorpicker', 'heading' => __('Color', 'porto'), 'param_name' => 'color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))));
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('tour_type'), 'admin_label' => true));
        /* ---------------------------- */
        /* Customize Separator
           /* ---------------------------- */
        vc_remove_param('vc_separator', 'style');
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('separator_type')));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Style', 'porto'), 'param_name' => 'style', 'value' => porto_vc_commons('separator_style'), 'dependency' => array('element' => 'type', 'value' => array(''))));
        vc_add_param('vc_separator', array('type' => 'attach_image', 'heading' => __('Pattern', 'porto'), 'param_name' => 'pattern', 'dependency' => array('element' => 'style', 'value' => array('pattern'))));
        vc_add_param('vc_separator', array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'type', 'value' => array(''))));
        vc_add_param('vc_separator', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'icon_bg_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'icon_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'icon_wrap_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom'))));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'icon_style', 'value' => porto_vc_commons('separator_icon_style'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Position', 'porto'), 'param_name' => 'icon_pos', 'value' => porto_vc_commons('separator_icon_pos'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Size', 'porto'), 'param_name' => 'icon_size', 'value' => porto_vc_commons('separator_icon_size'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Gap Size', 'porto'), 'param_name' => 'gap', 'value' => porto_vc_commons('separator')));
        /* ---------------------------- */
        /* Customize Text Separator
           /* ---------------------------- */
        vc_remove_param('vc_text_separator', 'style');
        vc_add_param('vc_text_separator', array('type' => 'dropdown', 'heading' => __('Style', 'porto'), 'param_name' => 'style', 'value' => porto_vc_commons('separator_style')));
        vc_add_param('vc_text_separator', array('type' => 'attach_image', 'heading' => __('Pattern', 'porto'), 'param_name' => 'pattern', 'dependency' => array('element' => 'style', 'value' => array('pattern'))));
        vc_add_param('vc_text_separator', array('type' => 'dropdown', 'heading' => __('Element Tag', 'porto'), 'param_name' => 'element', 'std' => 'h4', 'value' => porto_vc_commons('separator_elements')));
        /* ---------------------------- */
        /* Customize Accordion, Accordion Tab
           /* ---------------------------- */
        vc_remove_param('vc_accordion', 'disable_keyboard');
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('accordion')));
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Size', 'porto'), 'param_name' => 'size', 'value' => porto_vc_commons('accordion_size')));
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('custom'))));
        vc_add_param('vc_accordion', array('type' => 'colorpicker', 'heading' => __('Heading Color', 'porto'), 'param_name' => 'heading_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))));
        vc_add_param('vc_accordion', array('type' => 'colorpicker', 'heading' => __('Heading Background Color', 'porto'), 'param_name' => 'heading_bg_color', 'dependency' => array('element' => 'skin', 'value' => array('custom'))));
        vc_add_param('vc_accordion_tab', array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_accordion_tab', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        /* ---------------------------- */
        /* Customize Toggle
           /* ---------------------------- */
        vc_remove_param('vc_toggle', 'style');
        vc_remove_param('vc_toggle', 'color');
        vc_remove_param('vc_toggle', 'size');
        vc_add_param('vc_toggle', array('type' => 'checkbox', 'heading' => __('Show FontAwesome Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_toggle', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'show_icon', 'not_empty' => true)));
        /* ---------------------------- */
        /* Customize Buttons
           /* ---------------------------- */
        vc_add_param('vc_button', array('type' => 'checkbox', 'heading' => __('Disable', 'porto'), 'param_name' => 'disabled', 'value' => array(__('Disable button.', 'porto') => 'yes')));
        vc_add_param('vc_button', array('type' => 'checkbox', 'heading' => __('Show as Label', 'porto'), 'param_name' => 'label', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_btn', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors')));
        vc_add_param('vc_btn', array('type' => 'dropdown', 'heading' => __('Contextual Classes', 'porto'), 'param_name' => 'contextual', 'value' => porto_vc_commons('contextual')));
        vc_add_param('vc_btn', array('type' => 'checkbox', 'heading' => __('Show as Label', 'porto'), 'param_name' => 'label', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        /* ---------------------------- */
        /* Add Single Image Parameters
           /* ---------------------------- */
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('LightBox', 'porto'), 'param_name' => 'lightbox', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'img_link_large', 'not_empty' => true), 'description' => __('Check it if you want to link to the lightbox with the large image.', 'porto')));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show as Image Gallery', 'porto'), 'param_name' => 'image_gallery', 'description' => __('Show all the images inside of same row.', 'porto'), 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'img_link_large', 'not_empty' => true)));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show Zoom Icon', 'porto'), 'param_name' => 'zoom_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'img_link_large', 'not_empty' => true)));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show Hover Effect', 'porto'), 'param_name' => 'hover_effect', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'img_link_large', 'not_empty' => true)));
        /* ---------------------------- */
        /* Customize Progress Bar
           /* ---------------------------- */
        vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Contextual Classes', 'porto'), 'param_name' => 'contextual', 'value' => porto_vc_commons('contextual'), 'admin_label' => true));
        vc_add_param('vc_progress_bar', array('type' => 'checkbox', 'heading' => __('Enable Waypoints Animation', 'porto'), 'param_name' => 'animation', 'std' => 'yes', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_progress_bar', array('type' => 'checkbox', 'heading' => __('Show Percentage as Tooltip', 'porto'), 'param_name' => 'tooltip', 'std' => 'yes', 'value' => array(__('Yes, please', 'js_composer') => 'yes')));
        vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Border Radius', 'porto'), 'param_name' => 'border_radius', 'value' => porto_vc_commons('progress_border_radius')));
        vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Size', 'porto'), 'param_name' => 'size', 'value' => porto_vc_commons('progress_size')));
        vc_add_param('vc_progress_bar', array('type' => 'textfield', 'heading' => __('Min Width', 'porto'), 'description' => 'ex: 2em or 30px, etc', 'param_name' => 'min_width'));
        /* ---------------------------- */
        /* Customize Pie Chart
           /* ---------------------------- */
        vc_remove_param('vc_pie', 'color');
        // Used in 'Button', 'Call __( 'Blue', 'js_composer' )to Action', 'Pie chart' blocks
        $colors_arr = array(__('Grey', 'js_composer') => 'wpb_button', __('Blue', 'js_composer') => 'btn-primary', __('Turquoise', 'js_composer') => 'btn-info', __('Green', 'js_composer') => 'btn-success', __('Orange', 'js_composer') => 'btn-warning', __('Red', 'js_composer') => 'btn-danger', __('Black', 'js_composer') => 'btn-inverse');
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'std' => 'custom', 'value' => array(__('Porto Circular Bar', 'porto') => 'custom', __('VC Pie Chart', 'porto') => 'default'), 'description' => __('Select pie chart type.', 'porto'), 'admin_label' => true));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Bar color', 'porto'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Select pie chart color.', 'js_composer'), 'dependency' => array('element' => 'type', 'value' => array('default')), 'param_holder_class' => 'vc_colored-dropdown'));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('View Type', 'porto'), 'param_name' => 'view', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'value' => porto_vc_commons('circular_view_type')));
        vc_add_param('vc_pie', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'view', 'value' => array('only-icon'))));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'view', 'value' => array('only-icon'))));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('View Size', 'porto'), 'param_name' => 'view_size', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'value' => porto_vc_commons('circular_view_size')));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Bar Size', 'porto'), 'param_name' => 'size', 'std' => 175, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the size of the chart in px.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Track Color', 'porto'), 'param_name' => 'trackcolor', 'std' => $dark ? '#2e353e' : '#eeeeee', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose the color of the track. Please clear this if you want to use the default color.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Bar color', 'porto'), 'param_name' => 'barcolor', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Select pie chart color. Please clear this if you want to use the default color.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Scale color', 'porto'), 'param_name' => 'scalecolor', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose the color of the scale. Please clear this if you want to hide the scale.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Animation Speed', 'porto'), 'param_name' => 'speed', 'std' => 2500, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the animation speed in milliseconds.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Line Width', 'porto'), 'param_name' => 'line', 'std' => 14, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the width of the line bar in px.', 'porto')));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Line Cap', 'porto'), 'param_name' => 'linecap', 'std' => 'round', 'value' => array(__('Round', 'porto') => 'round', __('Square', 'porto') => 'square'), 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose how the ending of the bar line looks like.', 'porto')));
    }
}
示例#16
0
function porto_load_shortcodes()
{
    if (function_exists('vc_map')) {
        global $porto_settings;
        $dark = porto_is_dark_skin();
        $section_group = __('Porto Options', 'porto');
        $sticky_group = __('Sticky Options', 'porto');
        $animation_group = __('Animation', 'porto');
        $animation_type = array("type" => "porto_theme_animation_type", "heading" => __("Animation Type", 'porto'), "param_name" => "animation_type", 'group' => $animation_group);
        $animation_duration = array("type" => "textfield", "heading" => __("Animation Duration", 'porto'), "param_name" => "animation_duration", "description" => __("numerical value (unit: milliseconds)", 'porto'), "value" => '1000', 'group' => $animation_group);
        $animation_delay = array("type" => "textfield", "heading" => __("Animation Delay", 'porto'), "param_name" => "animation_delay", "description" => __("numerical value (unit: milliseconds)", 'porto'), "value" => '0', 'group' => $animation_group);
        /* ---------------------------- */
        /* Customize Row
           /* ---------------------------- */
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Wrap as Container', 'porto'), 'param_name' => 'wrap_container', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section & Parallax Text Color', 'porto'), 'param_name' => 'section_text_color', 'value' => porto_vc_commons('section_text_color'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Text Align', 'porto'), 'param_name' => 'text_align', 'value' => porto_vc_commons('align'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Is Section?', 'porto'), 'param_name' => 'is_section', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section Skin Color', 'porto'), 'param_name' => 'section_skin', 'value' => porto_vc_commons('section_skin'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section Default Color Scale', 'porto'), 'param_name' => 'section_color_scale', 'value' => porto_vc_commons('section_color_scale'), 'dependency' => array('element' => 'section_skin', 'value' => array('default')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Section Color Scale', 'porto'), 'param_name' => 'section_skin_scale', 'dependency' => array('element' => 'section_skin', 'value' => array('primary', 'secondary', 'tertiary', 'quaternary', 'dark', 'light')), 'group' => $section_group, 'value' => array(__('Default', 'porto') => '', __('Scale 2', 'porto') => 'scale-2')));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Margin Top', 'porto'), 'param_name' => 'remove_margin_top', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Margin Bottom', 'porto'), 'param_name' => 'remove_margin_bottom', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Padding Top', 'porto'), 'param_name' => 'remove_padding_top', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Padding Bottom', 'porto'), 'param_name' => 'remove_padding_bottom', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Remove Border', 'porto'), 'param_name' => 'remove_border', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Show Divider', 'porto'), 'param_name' => 'show_divider', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'is_section', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Divider Position', 'porto'), 'param_name' => 'divider_pos', 'value' => array(__('Top', 'porto') => '', __('Bottom', 'porto') => 'bottom'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Divider Color', 'porto'), 'param_name' => 'divider_color', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Divider Height', 'porto'), 'param_name' => 'divider_height', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Show Divider Icon', 'porto'), 'param_name' => 'show_divider_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'porto') => 'fontawesome', __('Simple Line Icon', 'porto') => 'simpleline'), 'param_name' => 'divider_icon_type', 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'divider_icon', 'dependency' => array('element' => 'divider_icon_type', 'value' => 'fontawesome'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'divider_icon_simpleline', 'value' => '', 'settings' => array('type' => 'simpleline', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'divider_icon_type', 'value' => 'simpleline'), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'divider_icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'divider_icon_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'divider_icon_bg_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'divider_icon_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'divider_icon_wrap_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'divider_icon_style', 'value' => porto_vc_commons('separator_icon_style'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Position', 'porto'), 'param_name' => 'divider_icon_pos', 'value' => porto_vc_commons('separator_icon_pos'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Icon Size', 'porto'), 'param_name' => 'divider_icon_size', 'value' => porto_vc_commons('separator_icon_size'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_row', array('type' => 'checkbox', 'heading' => __('Enable Sticky Options?', 'porto'), 'param_name' => 'is_sticky', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $sticky_group, 'admin_label' => true));
        vc_add_param('vc_row', array("type" => "textfield", "heading" => __("Container Selector", 'porto'), "param_name" => "sticky_container_selector", "value" => ".main-content", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row', array("type" => "textfield", "heading" => __("Min Width (unit: px)", 'porto'), "param_name" => "sticky_min_width", "" => __("Wll be disabled if window width is smaller than min width", 'porto'), "value" => "767", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row', array("type" => "textfield", "heading" => __("Top (unit: px)", 'porto'), "param_name" => "sticky_top", "" => __("Top position when active", 'porto'), "value" => "110", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row', array("type" => "textfield", "heading" => __("Bottom (unit: px)", 'porto'), "param_name" => "sticky_bottom", "" => __("Bottom position when active", 'porto'), "value" => "0", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row', array("type" => "textfield", "heading" => __("Active Class", 'porto'), "param_name" => "sticky_active_class", "value" => "sticky-active", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row', $animation_type);
        vc_add_param('vc_row', $animation_duration);
        vc_add_param('vc_row', $animation_delay);
        vc_add_param('vc_row_inner', array('type' => 'checkbox', 'heading' => __('Enable Sticky Options?', 'porto'), 'param_name' => 'is_sticky', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $sticky_group, 'admin_label' => true));
        vc_add_param('vc_row_inner', array("type" => "textfield", "heading" => __("Container Selector", 'porto'), "param_name" => "sticky_container_selector", "value" => ".vc_row", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row_inner', array("type" => "textfield", "heading" => __("Min Width (unit: px)", 'porto'), "param_name" => "sticky_min_width", "" => __("Wll be disabled if window width is smaller than min width", 'porto'), "value" => "767", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row_inner', array("type" => "textfield", "heading" => __("Top (unit: px)", 'porto'), "param_name" => "sticky_top", "" => __("Top position when active", 'porto'), "value" => "110", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row_inner', array("type" => "textfield", "heading" => __("Bottom (unit: px)", 'porto'), "param_name" => "sticky_bottom", "" => __("Bottom position when active", 'porto'), "value" => "0", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row_inner', array("type" => "textfield", "heading" => __("Active Class", 'porto'), "param_name" => "sticky_active_class", "value" => "sticky-active", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_row_inner', $animation_type);
        vc_add_param('vc_row_inner', $animation_duration);
        vc_add_param('vc_row_inner', $animation_delay);
        /* ---------------------------- */
        /* Customize Column
           /* ---------------------------- */
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section & Parallax Text Color', 'porto'), 'param_name' => 'section_text_color', 'value' => porto_vc_commons('section_text_color'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Text Align', 'porto'), 'param_name' => 'text_align', 'value' => porto_vc_commons('align'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Is Section?', 'porto'), 'param_name' => 'is_section', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section Skin Color', 'porto'), 'param_name' => 'section_skin', 'value' => porto_vc_commons('section_skin'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section Default Color Scale', 'porto'), 'param_name' => 'section_color_scale', 'value' => porto_vc_commons('section_color_scale'), 'dependency' => array('element' => 'section_skin', 'value' => array('default')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Section Color Scale', 'porto'), 'param_name' => 'section_skin_scale', 'dependency' => array('element' => 'section_skin', 'value' => array('primary', 'secondary', 'tertiary', 'quaternary', 'dark', 'light')), 'group' => $section_group, 'value' => array(__('Default', 'porto') => '', __('Scale 2', 'porto') => 'scale-2')));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Margin Top', 'porto'), 'param_name' => 'remove_margin_top', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Margin Bottom', 'porto'), 'param_name' => 'remove_margin_bottom', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Padding Top', 'porto'), 'param_name' => 'remove_padding_top', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Padding Bottom', 'porto'), 'param_name' => 'remove_padding_bottom', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Remove Border', 'porto'), 'param_name' => 'remove_border', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Show Divider', 'porto'), 'param_name' => 'show_divider', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'is_section', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Divider Position', 'porto'), 'param_name' => 'divider_pos', 'value' => array(__('Top', 'porto') => '', __('Bottom', 'porto') => 'bottom'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Divider Color', 'porto'), 'param_name' => 'divider_color', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'textfield', 'heading' => __('Divider Height', 'porto'), 'param_name' => 'divider_height', 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Show Divider Icon', 'porto'), 'param_name' => 'show_divider_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'dependency' => array('element' => 'show_divider', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'porto') => 'fontawesome', __('Simple Line Icon', 'porto') => 'simpleline'), 'param_name' => 'divider_icon_type', 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'divider_icon', 'dependency' => array('element' => 'divider_icon_type', 'value' => 'fontawesome'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'divider_icon_simpleline', 'value' => '', 'settings' => array('type' => 'simpleline', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'divider_icon_type', 'value' => 'simpleline'), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'divider_icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'divider_icon_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'divider_icon_bg_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'divider_icon_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'divider_icon_wrap_border_color', 'dependency' => array('element' => 'divider_icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'divider_icon_style', 'value' => porto_vc_commons('separator_icon_style'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Position', 'porto'), 'param_name' => 'divider_icon_pos', 'value' => porto_vc_commons('separator_icon_pos'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'dropdown', 'heading' => __('Icon Size', 'porto'), 'param_name' => 'divider_icon_size', 'value' => porto_vc_commons('separator_icon_size'), 'dependency' => array('element' => 'show_divider_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_column', array('type' => 'checkbox', 'heading' => __('Enable Sticky Options?', 'porto'), 'param_name' => 'is_sticky', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $sticky_group, 'admin_label' => true));
        vc_add_param('vc_column', array("type" => "textfield", "heading" => __("Container Selector", 'porto'), "param_name" => "sticky_container_selector", "value" => ".vc_row", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column', array("type" => "textfield", "heading" => __("Min Width (unit: px)", 'porto'), "param_name" => "sticky_min_width", "" => __("Wll be disabled if window width is smaller than min width", 'porto'), "value" => "767", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column', array("type" => "textfield", "heading" => __("Top (unit: px)", 'porto'), "param_name" => "sticky_top", "" => __("Top position when active", 'porto'), "value" => "110", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column', array("type" => "textfield", "heading" => __("Bottom (unit: px)", 'porto'), "param_name" => "sticky_bottom", "" => __("Bottom position when active", 'porto'), "value" => "0", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column', array("type" => "textfield", "heading" => __("Active Class", 'porto'), "param_name" => "sticky_active_class", "value" => "sticky-active", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column', $animation_type);
        vc_add_param('vc_column', $animation_duration);
        vc_add_param('vc_column', $animation_delay);
        vc_add_param('vc_column_inner', array('type' => 'checkbox', 'heading' => __('Enable Sticky Options?', 'porto'), 'param_name' => 'is_sticky', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $sticky_group, 'admin_label' => true));
        vc_add_param('vc_column_inner', array("type" => "textfield", "heading" => __("Container Selector", 'porto'), "param_name" => "sticky_container_selector", "value" => ".vc_row", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column_inner', array("type" => "textfield", "heading" => __("Min Width (unit: px)", 'porto'), "param_name" => "sticky_min_width", "" => __("Wll be disabled if window width is smaller than min width", 'porto'), "value" => "767", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column_inner', array("type" => "textfield", "heading" => __("Top (unit: px)", 'porto'), "param_name" => "sticky_top", "" => __("Top position when active", 'porto'), "value" => "110", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column_inner', array("type" => "textfield", "heading" => __("Bottom (unit: px)", 'porto'), "param_name" => "sticky_bottom", "" => __("Bottom position when active", 'porto'), "value" => "0", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column_inner', array("type" => "textfield", "heading" => __("Active Class", 'porto'), "param_name" => "sticky_active_class", "value" => "sticky-active", 'dependency' => array('element' => 'is_sticky', 'not_empty' => true), 'group' => $sticky_group));
        vc_add_param('vc_column_inner', $animation_type);
        vc_add_param('vc_column_inner', $animation_duration);
        vc_add_param('vc_column_inner', $animation_delay);
        /* ---------------------------- */
        /* Customize Custom Heading
           /* ---------------------------- */
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'group' => $section_group));
        vc_add_param('vc_custom_heading', array('type' => 'checkbox', 'heading' => __('Show Border', 'porto'), 'param_name' => 'show_border', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Border Skin Color', 'porto'), 'param_name' => 'border_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_border', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_custom_heading', array('type' => 'colorpicker', 'heading' => __('Border Color', 'porto'), 'param_name' => 'border_color', 'dependency' => array('element' => 'border_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Border Type', 'porto'), 'param_name' => 'border_type', 'value' => porto_vc_commons('heading_border_type'), 'dependency' => array('element' => 'show_border', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_custom_heading', array('type' => 'dropdown', 'heading' => __('Border Size', 'porto'), 'param_name' => 'border_size', 'value' => porto_vc_commons('heading_border_size'), 'dependency' => array('element' => 'show_border', 'not_empty' => true), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Tabs, Tab
           /* ---------------------------- */
        vc_remove_param('vc_tabs', 'interval');
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Position', 'porto'), 'param_name' => 'position', 'value' => porto_vc_commons('tabs'), 'description' => __('Select the position of the tab header.', 'porto'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_tabs', array('type' => 'colorpicker', 'heading' => __('Color', 'porto'), 'param_name' => 'color', 'dependency' => array('element' => 'skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('tabs_type'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'icon_style', 'value' => porto_vc_commons('tabs_icon_style'), 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('tabs-simple')), 'group' => $section_group));
        vc_add_param('vc_tabs', array('type' => 'dropdown', 'heading' => __('Icon Effect', 'porto'), 'param_name' => 'icon_effect', 'value' => porto_vc_commons('tabs_icon_effect'), 'group' => $section_group, 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('tabs-simple'))));
        vc_add_param('vc_tab', array('type' => 'checkbox', 'heading' => __('Show Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'porto') => 'fontawesome', __('Simple Line Icon', 'porto') => 'simpleline'), 'param_name' => 'icon_type', 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome'), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon_simpleline', 'value' => '', 'settings' => array('type' => 'simpleline', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'simpleline'), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'label', 'heading' => __('Please configure the following options when Tabs Type is Simple.', 'porto'), 'param_name' => 'label', 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'icon_bg_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'icon_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'icon_wrap_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Box Shadow Color', 'porto'), 'param_name' => 'icon_shadow_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Color', 'porto'), 'param_name' => 'icon_hcolor', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Background Color', 'porto'), 'param_name' => 'icon_hbg_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Border Color', 'porto'), 'param_name' => 'icon_hborder_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Hover Border Color', 'porto'), 'param_name' => 'icon_wrap_hborder_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_tab', array('type' => 'colorpicker', 'heading' => __('Icon Hover Box Shadow Color', 'porto'), 'param_name' => 'icon_hshadow_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Tour
           /* ---------------------------- */
        vc_remove_param('vc_tour', 'interval');
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Position', 'porto'), 'param_name' => 'position', 'value' => porto_vc_commons('tour'), 'description' => __('Select the position of the tab header.', 'porto'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'group' => $section_group, 'admin_label' => true));
        vc_add_param('vc_tour', array('type' => 'colorpicker', 'heading' => __('Color', 'porto'), 'param_name' => 'color', 'group' => $section_group, 'dependency' => array('element' => 'skin', 'value' => array('custom'))));
        vc_add_param('vc_tour', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('tour_type'), 'group' => $section_group, 'admin_label' => true));
        /* ---------------------------- */
        /* Customize Separator
           /* ---------------------------- */
        vc_remove_param('vc_separator', 'style');
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('separator_type'), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Style', 'porto'), 'param_name' => 'style', 'value' => porto_vc_commons('separator_style'), 'dependency' => array('element' => 'type', 'value' => array('')), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'attach_image', 'heading' => __('Pattern', 'porto'), 'param_name' => 'pattern', 'dependency' => array('element' => 'style', 'value' => array('pattern')), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'checkbox', 'heading' => __('Show Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'porto') => 'fontawesome', __('Simple Line Icon', 'porto') => 'simpleline'), 'param_name' => 'icon_type', 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome'), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon_simpleline', 'value' => '', 'settings' => array('type' => 'simpleline', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'simpleline'), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Skin Color', 'porto'), 'param_name' => 'icon_skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Background Color', 'porto'), 'param_name' => 'icon_bg_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Border Color', 'porto'), 'param_name' => 'icon_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'colorpicker', 'heading' => __('Icon Wrap Border Color', 'porto'), 'param_name' => 'icon_wrap_border_color', 'dependency' => array('element' => 'icon_skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Style', 'porto'), 'param_name' => 'icon_style', 'value' => porto_vc_commons('separator_icon_style'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Position', 'porto'), 'param_name' => 'icon_pos', 'value' => porto_vc_commons('separator_icon_pos'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Icon Size', 'porto'), 'param_name' => 'icon_size', 'value' => porto_vc_commons('separator_icon_size'), 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_separator', array('type' => 'dropdown', 'heading' => __('Gap Size', 'porto'), 'param_name' => 'gap', 'value' => porto_vc_commons('separator'), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Text Separator
           /* ---------------------------- */
        vc_remove_param('vc_text_separator', 'style');
        vc_add_param('vc_text_separator', array('type' => 'dropdown', 'heading' => __('Style', 'porto'), 'param_name' => 'style', 'value' => porto_vc_commons('separator_style'), 'group' => $section_group));
        vc_add_param('vc_text_separator', array('type' => 'attach_image', 'heading' => __('Pattern', 'porto'), 'param_name' => 'pattern', 'dependency' => array('element' => 'style', 'value' => array('pattern')), 'group' => $section_group));
        vc_add_param('vc_text_separator', array('type' => 'dropdown', 'heading' => __('Element Tag', 'porto'), 'param_name' => 'element', 'std' => 'h4', 'value' => porto_vc_commons('separator_elements'), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Accordion, Accordion Tab
           /* ---------------------------- */
        vc_remove_param('vc_accordion', 'disable_keyboard');
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'value' => porto_vc_commons('accordion'), 'group' => $section_group));
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Size', 'porto'), 'param_name' => 'size', 'value' => porto_vc_commons('accordion_size'), 'group' => $section_group));
        vc_add_param('vc_accordion', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'admin_label' => true, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_accordion', array('type' => 'colorpicker', 'heading' => __('Heading Color', 'porto'), 'param_name' => 'heading_color', 'dependency' => array('element' => 'skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_accordion', array('type' => 'colorpicker', 'heading' => __('Heading Background Color', 'porto'), 'param_name' => 'heading_bg_color', 'dependency' => array('element' => 'skin', 'value' => array('custom')), 'group' => $section_group));
        vc_add_param('vc_accordion_tab', array('type' => 'checkbox', 'heading' => __('Show Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_accordion_tab', array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'porto') => 'fontawesome', __('Simple Line Icon', 'porto') => 'simpleline'), 'param_name' => 'icon_type', 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_accordion_tab', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome'), 'group' => $section_group));
        vc_add_param('vc_accordion_tab', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon_simpleline', 'value' => '', 'settings' => array('type' => 'simpleline', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'simpleline'), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Toggle
           /* ---------------------------- */
        vc_remove_param('vc_toggle', 'style');
        vc_remove_param('vc_toggle', 'color');
        vc_remove_param('vc_toggle', 'size');
        vc_add_param('vc_toggle', array('type' => 'checkbox', 'heading' => __('Show Icon', 'porto'), 'param_name' => 'show_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_toggle', array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'porto') => 'fontawesome', __('Simple Line Icon', 'porto') => 'simpleline'), 'param_name' => 'icon_type', 'dependency' => array('element' => 'show_icon', 'not_empty' => true), 'group' => $section_group));
        vc_add_param('vc_toggle', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome'), 'group' => $section_group));
        vc_add_param('vc_toggle', array('type' => 'iconpicker', 'heading' => __('Select Icon', 'porto'), 'param_name' => 'icon_simpleline', 'value' => '', 'settings' => array('type' => 'simpleline', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'simpleline'), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Buttons
           /* ---------------------------- */
        vc_add_param('vc_button', array('type' => 'checkbox', 'heading' => __('Disable', 'porto'), 'param_name' => 'disabled', 'value' => array(__('Disable button.', 'porto') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_button', array('type' => 'checkbox', 'heading' => __('Show as Label', 'porto'), 'param_name' => 'label', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_btn', array('type' => 'dropdown', 'heading' => __('Skin Color', 'porto'), 'param_name' => 'skin', 'std' => 'custom', 'value' => porto_vc_commons('colors'), 'group' => $section_group));
        vc_add_param('vc_btn', array('type' => 'dropdown', 'heading' => __('Color Scale', 'porto'), 'param_name' => 'scale', 'std' => '', 'value' => array(__('Default', 'porto') => '', __('Scale 2', 'porto') => 'scale-2'), 'group' => $section_group));
        vc_add_param('vc_btn', array('type' => 'dropdown', 'heading' => __('Contextual Classes', 'porto'), 'param_name' => 'contextual', 'value' => porto_vc_commons('contextual'), 'group' => $section_group));
        vc_add_param('vc_btn', array('type' => 'checkbox', 'heading' => __('Show as Label', 'porto'), 'param_name' => 'label', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        /* ---------------------------- */
        /* Add Single Image Parameters
           /* ---------------------------- */
        vc_add_param('vc_single_image', array('type' => 'label', 'heading' => __('Please select "On click action" as "Link to Large Image" in "Design Section" before configure.', 'porto'), 'param_name' => 'label', 'group' => $section_group));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('LightBox', 'porto'), 'param_name' => 'lightbox', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'description' => __('Check it if you want to link to the lightbox with the large image.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show as Image Gallery', 'porto'), 'param_name' => 'image_gallery', 'description' => __('Show all the images inside of same row.', 'porto'), 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show Zoom Icon', 'porto'), 'param_name' => 'zoom_icon', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_single_image', array('type' => 'checkbox', 'heading' => __('Show Hover Effect', 'porto'), 'param_name' => 'hover_effect', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Progress Bar
           /* ---------------------------- */
        vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Contextual Classes', 'porto'), 'param_name' => 'contextual', 'value' => porto_vc_commons('contextual'), 'admin_label' => true, 'group' => $section_group));
        vc_add_param('vc_progress_bar', array('type' => 'checkbox', 'heading' => __('Enable Waypoints Animation', 'porto'), 'param_name' => 'animation', 'std' => 'yes', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_progress_bar', array('type' => 'checkbox', 'heading' => __('Show Percentage as Tooltip', 'porto'), 'param_name' => 'tooltip', 'std' => 'yes', 'value' => array(__('Yes, please', 'js_composer') => 'yes'), 'group' => $section_group));
        vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Border Radius', 'porto'), 'param_name' => 'border_radius', 'value' => porto_vc_commons('progress_border_radius'), 'group' => $section_group));
        vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Size', 'porto'), 'param_name' => 'size', 'value' => porto_vc_commons('progress_size'), 'group' => $section_group));
        vc_add_param('vc_progress_bar', array('type' => 'textfield', 'heading' => __('Min Width', 'porto'), 'description' => 'ex: 2em or 30px, etc', 'param_name' => 'min_width', 'group' => $section_group));
        /* ---------------------------- */
        /* Customize Pie Chart
           /* ---------------------------- */
        vc_remove_param('vc_pie', 'color');
        // Used in 'Button', 'Call __( 'Blue', 'js_composer' )to Action', 'Pie chart' blocks
        $colors_arr = array(__('Grey', 'js_composer') => 'wpb_button', __('Blue', 'js_composer') => 'btn-primary', __('Turquoise', 'js_composer') => 'btn-info', __('Green', 'js_composer') => 'btn-success', __('Orange', 'js_composer') => 'btn-warning', __('Red', 'js_composer') => 'btn-danger', __('Black', 'js_composer') => 'btn-inverse');
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Type', 'porto'), 'param_name' => 'type', 'std' => 'custom', 'value' => array(__('Porto Circular Bar', 'porto') => 'custom', __('VC Pie Chart', 'porto') => 'default'), 'description' => __('Select pie chart type.', 'porto'), 'admin_label' => true, 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Bar color', 'porto'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Select pie chart color.', 'js_composer'), 'dependency' => array('element' => 'type', 'value' => array('default')), 'param_holder_class' => 'vc_colored-dropdown', 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('View Type', 'porto'), 'param_name' => 'view', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'value' => porto_vc_commons('circular_view_type'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'iconpicker', 'heading' => __('Select FontAwesome Icon', 'porto'), 'param_name' => 'icon', 'dependency' => array('element' => 'view', 'value' => array('only-icon')), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Icon Color', 'porto'), 'param_name' => 'icon_color', 'dependency' => array('element' => 'view', 'value' => array('only-icon')), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('View Size', 'porto'), 'param_name' => 'view_size', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'value' => porto_vc_commons('circular_view_size'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Bar Size', 'porto'), 'param_name' => 'size', 'std' => 175, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the size of the chart in px.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Track Color', 'porto'), 'param_name' => 'trackcolor', 'std' => $dark ? '#2e353e' : '#eeeeee', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose the color of the track. Please clear this if you want to use the default color.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Bar color', 'porto'), 'param_name' => 'barcolor', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Select pie chart color. Please clear this if you want to use the default color.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Scale color', 'porto'), 'param_name' => 'scalecolor', 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose the color of the scale. Please clear this if you want to hide the scale.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Animation Speed', 'porto'), 'param_name' => 'speed', 'std' => 2500, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the animation speed in milliseconds.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Line Width', 'porto'), 'param_name' => 'line', 'std' => 14, 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Enter the width of the line bar in px.', 'porto'), 'group' => $section_group));
        vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Line Cap', 'porto'), 'param_name' => 'linecap', 'std' => 'round', 'value' => array(__('Round', 'porto') => 'round', __('Square', 'porto') => 'square'), 'dependency' => array('element' => 'type', 'value' => array('custom')), 'description' => __('Choose how the ending of the bar line looks like.', 'porto'), 'group' => $section_group));
    }
}
function porto_load_product_attribute_shortcode()
{
    $animation_type = porto_vc_animation_type();
    $animation_duration = porto_vc_animation_duration();
    $animation_delay = porto_vc_animation_delay();
    $custom_class = porto_vc_custom_class();
    $order_by_values = porto_vc_woo_order_by();
    $order_way_values = porto_vc_woo_order_way();
    $attributes_tax = wc_get_attribute_taxonomies();
    $attributes = array();
    foreach ($attributes_tax as $attribute) {
        $attributes[$attribute->attribute_label] = $attribute->attribute_name;
    }
    // woocommerce product attribute
    vc_map(array('name' => "Porto " . __('Product Attribute', 'js_composer'), 'base' => 'porto_product_attribute', 'icon' => 'porto_vc_woocommerce', 'category' => __('WooCommerce', 'js_composer'), 'description' => __('Show products with an attribute shortcode', 'porto-shortcodes'), 'params' => array(array('type' => 'textfield', 'heading' => __('Title', 'woocommerce'), 'param_name' => 'title', 'admin_label' => true), array('type' => 'dropdown', 'heading' => __('View mode', 'porto-shortcodes'), 'param_name' => 'view', 'value' => porto_vc_commons('products_view_mode'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Per page', 'js_composer'), 'value' => 12, 'param_name' => 'per_page', 'description' => __('The "per_page" shortcode determines how many products to show on the page', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Columns', 'porto-shortcodes'), 'param_name' => 'columns', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'std' => '4', 'value' => porto_vc_commons('products_columns')), array('type' => 'dropdown', 'heading' => __('Column Width', 'porto-shortcodes'), 'param_name' => 'column_width', 'dependency' => array('element' => 'view', 'value' => array('products-slider', 'grid')), 'value' => porto_vc_commons('products_column_width')), array('type' => 'dropdown', 'heading' => __('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => $order_by_values, 'description' => sprintf(__('Select how to sort retrieved products. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Order way', 'js_composer'), 'param_name' => 'order', 'value' => $order_way_values, 'description' => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Attribute', 'js_composer'), 'param_name' => 'attribute', 'value' => $attributes, 'description' => __('List of product taxonomy attribute', 'js_composer')), array('type' => 'checkbox', 'heading' => __('Filter', 'js_composer'), 'param_name' => 'filter', 'value' => array('empty' => 'empty'), 'description' => __('Taxonomy values', 'js_composer'), 'dependency' => array('element' => 'attribute', 'is_empty' => true, 'callback' => 'vc_woocommerce_product_attribute_filter_dependency_callback')), array('type' => 'dropdown', 'heading' => __('Add Links Position', 'porto-shortcodes'), 'desc' => 'Select position of add to cart, add to wishlist, quickview.', 'param_name' => 'addlinks_pos', 'value' => porto_vc_commons('products_addlinks_pos')), array('type' => 'checkbox', 'heading' => __('Show Navigation', 'porto-shortcodes'), 'param_name' => 'navigation', 'std' => 'yes', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), array('type' => 'checkbox', 'heading' => __('Show Pagination', 'porto-shortcodes'), 'param_name' => 'pagination', 'std' => 'no', 'dependency' => array('element' => 'view', 'value' => array('products-slider')), 'value' => array(__('Yes', 'js_composer') => 'yes')), $animation_type, $animation_duration, $animation_delay, $custom_class)));
    //For param: "filter" param value
    //vc_form_fields_render_field_{shortcode_name}_{param_name}_param
    add_filter('vc_form_fields_render_field_porto_product_attribute_filter_param', 'porto_shortcode_product_attribute_filter_param', 10, 4);
    // Defines default value for param if not provided. Takes from other param value.
    if (!class_exists('WPBakeryShortCode_Porto_Product_Attribute')) {
        class WPBakeryShortCode_Porto_Product_Attribute extends WPBakeryShortCode
        {
        }
    }
}