当前位置: 首页>>代码示例>>PHP>>正文


PHP porto_vc_commons函数代码示例

本文整理汇总了PHP中porto_vc_commons函数的典型用法代码示例。如果您正苦于以下问题:PHP porto_vc_commons函数的具体用法?PHP porto_vc_commons怎么用?PHP porto_vc_commons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了porto_vc_commons函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: porto_load_products_shortcode

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
        {
        }
    }
}
开发者ID:rinodung,项目名称:live-theme,代码行数:25,代码来源:porto_products.php

示例2: porto_load_testimonial_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:13,代码来源:porto_testimonial.php

示例3: porto_load_content_box_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:13,代码来源:porto_content_box.php

示例4: porto_load_content_box_shortcode

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
        {
        }
    }
}
开发者ID:rinodung,项目名称:live-theme,代码行数:13,代码来源:porto_content_box.php

示例5: porto_load_portfolios_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:13,代码来源:porto_portfolios.php

示例6: porto_load_toggles_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:13,代码来源:porto_toggles.php

示例7: porto_load_tooltip_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:13,代码来源:porto_tooltip.php

示例8: porto_load_blockquote_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:13,代码来源:porto_blockquote.php

示例9: porto_load_best_selling_products_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:14,代码来源:porto_best_selling_products.php

示例10: porto_load_sale_products_shortcode

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
        {
        }
    }
}
开发者ID:alikagitci,项目名称:honda.yedekleri,代码行数:16,代码来源:porto_sale_products.php

示例11: porto_load_product_category_shortcode

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
        {
        }
    }
}
开发者ID:rinodung,项目名称:live-theme,代码行数:21,代码来源:porto_product_category.php

示例12: porto_load_product_categories_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:22,代码来源:porto_product_categories.php

示例13: porto_load_product_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:22,代码来源:porto_product.php

示例14: porto_load_shortcodes

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')));
    }
}
开发者ID:alikagitci,项目名称:honda.yedekleri,代码行数:64,代码来源:shortcodes.php

示例15: porto_load_product_attribute_shortcode

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
        {
        }
    }
}
开发者ID:prosenjit-itobuz,项目名称:Unitee,代码行数:25,代码来源:porto_product_attribute.php


注:本文中的porto_vc_commons函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。