示例#1
0
<?php

return array('name' => __('Text Block', 'js_composer'), 'icon' => 'icon-wpb-layer-shape-text', 'wrapper_class' => 'clearfix', 'category' => __('Content', 'js_composer'), 'description' => __('A block of text with WYSIWYG editor', 'js_composer'), 'params' => array(array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Text', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>', 'js_composer')), vc_map_add_css_animation(), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer'))));
            wp_reset_postdata();
            $carousel_html = ob_get_clean();
            $carousel_html = str_replace('%carousel_html%', $carousel_html, $carousel_ouput);
            $class = $active_section == $i ? 'fade in active' : 'fade';
            $output_content .= sprintf('<div id="%s" class="tab-pane %s">%s</div><!-- .tab-pane -->', 'tab-' . $tab . '-' . $uniqeID, $class, $carousel_html);
            $i++;
        }
        $custom_css = '';
        $rand = 'wc-products-vertical-' . rand();
        if ($font_size) {
            $custom_css .= cruxstore_responsive_render('#' . $rand . ' .wc-products-vertical-title', 'font-size', $font_size);
        }
        if ($line_height) {
            $custom_css .= cruxstore_responsive_render('#' . $rand . ' .wc-products-vertical-title', 'line-height', $line_height);
        }
        $title = sprintf('<%1$s class="wc-products-vertical-title" %2$s>%3$s</%1$s>', $font_container_data['values']['tag'], $style, $title);
        $heading = sprintf('<div class="wc-products-vertical-heading">%s</div>', $tab_heading);
        $navigation = '<div class="wc-products-vertical-navigation"><span class="wc-products-vertical-left"><i class="fa fa-angle-left" aria-hidden="true"></i></span><span class="wc-products-vertical-right"><i class="fa fa-angle-right" aria-hidden="true"></i></span></div>';
        $content = $content ? sprintf('<div class="wc-products-vertical-content">%s</div>', $content) : '';
        $output = sprintf('<div class="row"><div class="col-md-3">%s</div><div class="col-md-9"><div class="tab-content">%s</div></div></div>', $title . $content . $heading . $navigation, $output_content);
        if ($custom_css) {
            $custom_css = '<div class="cruxstore_custom_css" data-css="' . esc_attr($custom_css) . '"></div>';
        }
        $output .= $custom_css;
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        $output = '<div id="' . $rand . '" class="' . esc_attr($elementClass) . '">' . $output . '</div>';
        return $output;
    }
}
vc_map(array("name" => esc_html__("KT: Products Tab Vertical", 'cruxstore'), "base" => "products_tab_vertical", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array(array("type" => "textfield", 'heading' => esc_html__('Title', 'js_composer'), 'param_name' => 'title', 'value' => esc_html__('Title', 'js_composer'), "admin_label" => true), array("type" => "textarea_html", "heading" => esc_html__("Content", 'cruxstore'), "param_name" => "content", "value" => '', "holder" => "div"), array("type" => "cruxstore_heading", "heading" => esc_html__("Data settings", 'cruxstore'), "param_name" => "data_settings"), array("type" => "dropdown", "heading" => esc_html__("Data source", 'cruxstore'), "param_name" => "source", "value" => array(esc_html__('Widgets', 'cruxstore') => 'widgets', esc_html__('Specific Categories', 'cruxstore') => 'categories'), 'std' => 'widgets', "admin_label" => true, "description" => esc_html__("Select content type for your posts.", 'cruxstore')), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'product_cat', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array('', esc_html__('Date', 'js_composer') => 'date', esc_html__('ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Modified', 'js_composer') => 'modified', esc_html__('Random', 'js_composer') => 'rand', esc_html__('Comment count', 'js_composer') => 'comment_count', esc_html__('Menu order', 'js_composer') => 'menu_order'), 'save_always' => true, "dependency" => array("element" => "source", "value" => 'categories'), 'description' => sprintf(esc_html__('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' => esc_html__('Sort order', 'js_composer'), 'param_name' => 'order', 'value' => array('', esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), 'save_always' => true, "dependency" => array("element" => "source", "value" => 'categories'), 'description' => sprintf(esc_html__('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' => esc_html__('Per page', 'js_composer'), 'value' => 8, 'param_name' => 'per_page', 'description' => esc_html__('The "per_page" shortcode determines how many products to show on the page', 'js_composer')), array("type" => "cruxstore_number", "heading" => esc_html__("Active section", 'cruxstore'), "param_name" => "active_section", "value" => "1", 'description' => esc_html__("Enter active section number (Note: to have all sections closed on initial load enter non-existing number).", 'cruxstore')), array("type" => "cruxstore_heading", "heading" => esc_html__("Others settings", 'cruxstore'), "param_name" => "others_settings"), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'hidden', 'param_name' => 'link'), array("type" => "cruxstore_heading", "heading" => esc_html__("Typography heading", 'cruxstore'), "param_name" => "typography_heading", 'group' => esc_html__('Typography', 'cruxstore')), array('type' => 'cruxstore_responsive', 'param_name' => 'font_size', 'heading' => esc_html__('Font size', 'cruxstore'), 'group' => esc_html__('Typography', 'cruxstore'), 'unit' => esc_html__('px', 'cruxstore'), 'description' => esc_html__('Use font size for the title.', 'cruxstore')), array('type' => 'cruxstore_responsive', 'param_name' => 'line_height', 'heading' => esc_html__('Line Height', 'cruxstore'), 'group' => esc_html__('Typography', 'cruxstore'), 'unit' => esc_html__('px', 'cruxstore'), 'description' => esc_html__('Use line height for the title.', 'cruxstore')), array("type" => "cruxstore_number", "heading" => esc_html__("Letter spacing", 'cruxstore'), "param_name" => "letter_spacing", "min" => 0, "suffix" => "px", 'group' => esc_html__('Typography', 'cruxstore')), array('type' => 'font_container', 'param_name' => 'font_container', 'value' => '', 'settings' => array('fields' => array('tag' => 'h3', 'color', 'tag_description' => esc_html__('Select element tag.', 'js_composer'), 'text_align_description' => esc_html__('Select text alignment.', 'js_composer'), 'font_size_description' => esc_html__('Enter font size.', 'js_composer'), 'line_height_description' => esc_html__('Enter line height.', 'js_composer'), 'color_description' => esc_html__('Select heading color.', 'js_composer'))), 'group' => esc_html__('Typography', 'cruxstore')), array('type' => 'checkbox', 'heading' => esc_html__('Use theme default font family?', 'js_composer'), 'param_name' => 'use_theme_fonts', 'value' => array(esc_html__('Yes', 'js_composer') => 'yes'), 'description' => esc_html__('Use font family from the theme.', 'js_composer'), 'group' => esc_html__('Typography', 'cruxstore'), 'std' => 'yes'), array('type' => 'google_fonts', 'param_name' => 'google_fonts', 'value' => 'font_family:Oswald|font_style:700%20regular%3A400%3Anormal', 'settings' => array('fields' => array('font_family_description' => esc_html__('Select font family.', 'js_composer'), 'font_style_description' => esc_html__('Select font styling.', 'js_composer'))), 'group' => esc_html__('Typography', 'cruxstore'), 'dependency' => array('element' => 'use_theme_fonts', 'value_not_equal_to' => 'yes')), array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer')))));
示例#3
0
<?php

/**
 * New button implementation
 * array_merge is needed due to merging other shortcode data into params.
 * @since 4.5
 */
global $pixel_icons;
$icons_params = vc_map_integrate_shortcode('vc_icon', 'i_', '', array('include_only_regex' => '/^(type|icon_\\w*)/'), array('element' => 'add_icon', 'value' => 'true'));
// populate integrated vc_icons params.
if (is_array($icons_params) && !empty($icons_params)) {
    foreach ($icons_params as $key => $param) {
        if (is_array($param) && !empty($param)) {
            if ($param['param_name'] == 'i_type') {
                // append pixelicons to dropdown
                $icons_params[$key]['value'][__('Pixel', 'js_composer')] = 'pixelicons';
            }
            if (isset($param['admin_label'])) {
                // remove admin label
                unset($icons_params[$key]['admin_label']);
            }
        }
    }
}
$params = array_merge(array(array('type' => 'textfield', 'heading' => __('Text Button', 'js_composer'), 'save_always' => true, 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer')), array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Add link to button.', 'js_composer')), array("type" => "dropdown", "class" => "", "heading" => __("Button Type", THEMENAME), "param_name" => "button_type", "value" => array('Button Default' => 'btn btn-default', 'Button Default White' => 'btn btn-default btn-white', 'Button Primary' => 'btn btn-primary', 'Button Green' => 'btn btn-green', 'Button Purple' => 'btn btn-purple', 'Button Crimson' => 'btn btn-crimson')), array('type' => 'dropdown', 'heading' => __('Alignment', 'js_composer'), 'param_name' => 'align', 'description' => __('Select button alignment.', 'js_comopser'), 'value' => array(__('Inline', 'js_composer') => 'inline', __('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right', __('Center', 'js_composer') => 'center')), array('type' => 'checkbox', 'heading' => __('Set full width button?', 'js_composer'), 'param_name' => 'button_block', 'dependency' => array('element' => 'align', 'value_not_equal_to' => 'inline')), array('type' => 'checkbox', 'heading' => __('Add icon?', 'js_composer'), 'param_name' => 'add_icon'), array('type' => 'dropdown', 'heading' => __('Icon Alignment', 'js_composer'), 'description' => __('Select icon alignment.', 'js_composer'), 'param_name' => 'i_align', 'value' => array(__('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right'), 'dependency' => array('element' => 'add_icon', 'value' => 'true'))), $icons_params, array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'i_icon_pixelicons', 'settings' => array('emptyIcon' => false, 'type' => 'pixelicons', 'source' => $pixel_icons), 'dependency' => array('element' => 'i_type', 'value' => 'pixelicons'), 'description' => __('Select icon from library.', 'js_composer'))), array(vc_map_add_css_animation(true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer'))));
/**
 * @class WPBakeryShortCode_VC_Btn
 */
vc_map(array('name' => __('Button', 'js_composer'), 'base' => 'vc_btn', 'icon' => 'icon-wpb-ui-button', 'category' => array(__('Content', 'js_composer')), 'description' => __('Eye catching button', 'js_composer'), 'params' => $params, 'js_view' => 'VcButton3View', 'custom_markup' => '{{title}}<div class="vc_btn3-container"><button class="vc_general vc_btn3 vc_btn3-size-sm vc_btn3-shape-{{ params.shape }} vc_btn3-style-{{ params.style }} vc_btn3-color-{{ params.color }}">{{{ params.title }}}</button></div>'));
            $product_categories = wp_list_filter($product_categories, array('parent' => $atts['parent']));
        }
        if ($hide_empty) {
            foreach ($product_categories as $key => $category) {
                if ($category->count == 0) {
                    unset($product_categories[$key]);
                }
            }
        }
        if ($atts['number']) {
            $product_categories = array_slice($product_categories, 0, $atts['number']);
        }
        ob_start();
        if ($product_categories) {
            global $woocommerce_carousel;
            $woocommerce_carousel = $categories_style;
            foreach ($product_categories as $category) {
                wc_get_template('content-product_cat_carousel.php', array('category' => $category));
            }
        }
        wp_reset_postdata();
        $carousel_html .= ob_get_clean();
        if ($carousel_html) {
            $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
            $output = '<div class="' . esc_attr($elementClass) . '">' . str_replace('%carousel_html%', $carousel_html, $carousel_ouput) . '</div>';
        }
        return $output;
    }
}
vc_map(array("name" => esc_html__("KT: Product Categories Carousel", 'cruxstore'), "base" => "categories_carousel", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array_merge(array(array("type" => "cruxstore_taxonomy", 'taxonomy' => 'product_cat', 'heading' => esc_html__('Categories', 'js_composer'), 'param_name' => 'ids', 'multiple' => true, 'admin_label' => true, 'select' => 'id', 'description' => esc_html__('List of product categories', 'cruxstore')), array('type' => 'dropdown', 'heading' => esc_html__('Categories style', 'js_composer'), 'param_name' => 'categories_style', 'value' => array(esc_html__('Normal', 'cruxstore') => 'normal', esc_html__('Portrait', 'cruxstore') => 'portrait', esc_html__('Modern', 'cruxstore') => 'modern'), 'std' => 'normal', 'admin_label' => true, "description" => esc_html__("Select your categories style.", 'cruxstore')), array('type' => 'textfield', 'heading' => esc_html__('Per Page', 'js_composer'), 'value' => '', 'param_name' => 'per_page', 'description' => esc_html__('The "per_page" shortcode determines how many categories to show on the page', 'js_composer')), "admin_label" => true, array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(esc_html__('Name', 'js_composer') => 'name', esc_html__('ID', 'js_composer') => 'id', esc_html__('Count', 'js_composer') => 'count', esc_html__('Slug', 'js_composer') => 'slug', esc_html__('None', 'js_composer') => 'none'), 'std' => 'name', 'param_holder_class' => 'vc_grid-data-type-not-ids', "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Sorting', 'js_composer'), 'param_name' => 'order', 'value' => array(esc_html__('Ascending', 'js_composer') => 'ASC', esc_html__('Descending', 'js_composer') => 'DESC'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'description' => esc_html__('Select sorting order.', 'js_composer'), "admin_label" => true), array('type' => 'cruxstore_switch', 'heading' => esc_html__('Hide empty', 'cruxstore'), 'param_name' => 'hide_empty', 'value' => 'true', "description" => esc_html__("Hide category if empty.", 'cruxstore')), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), cruxstore_map_add_carousel_parrams(), array(array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer'))))));
示例#5
0
<?php

return array('name' => __('FAQ', 'js_composer'), 'base' => 'vc_toggle', 'icon' => 'icon-wpb-toggle-small-expand', 'category' => __('Content', 'js_composer'), 'description' => __('Toggle element for Q&A block', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'h4', 'class' => 'vc_toggle_title', 'heading' => __('Toggle title', 'js_composer'), 'param_name' => 'title', 'value' => __('Toggle title', 'js_composer'), 'description' => __('Enter title of toggle block.', 'js_composer')), array('type' => 'textarea_html', 'holder' => 'div', 'class' => 'vc_toggle_content', 'heading' => __('Toggle content', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>Toggle content goes here, click edit button to change this text.</p>', 'js_composer'), 'description' => __('Toggle block content.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('toggle styles'), 'description' => __('Select toggle design style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Icon color', 'js_composer'), 'param_name' => 'color', 'value' => array(__('Default', 'js_composer') => 'default') + getVcShared('colors'), 'description' => __('Select icon color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => array_diff_key(getVcShared('sizes'), array('Mini' => '')), 'std' => 'md', 'description' => __('Select toggle size', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Default state', 'js_composer'), 'param_name' => 'open', 'value' => array(__('Closed', 'js_composer') => 'false', __('Open', 'js_composer') => 'true'), 'description' => __('Select "Open" if you want toggle to be open by default.', 'js_composer')), vc_map_add_css_animation(), array('type' => 'el_id', 'heading' => __('Element ID', 'js_composer'), 'param_name' => 'el_id', 'description' => sprintf(__('Enter optional ID. Make sure it is unique, and it is valid as w3c specification: %s (Must not have spaces)', 'js_composer'), '<a target="_blank" href="http://www.w3schools.com/tags/att_global_id.asp">' . __('link', 'js_composer') . '</a>'), 'settings' => array('auto_generate' => true)), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer'))), 'js_view' => 'VcToggleView');
示例#6
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
class WPBakeryShortCode_Vertical_menu extends WPBakeryShortCode
{
    protected function content($atts, $content = null)
    {
        $atts = shortcode_atts(array('css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vertical-menu ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'animation' => $this->getCSSAnimation($css_animation));
        $output = '';
        ob_start();
        if (has_nav_menu('vertical')) {
            wp_nav_menu(array('theme_location' => 'vertical', 'container' => '', 'link_before' => '<span>', 'link_after' => '</span>', 'menu_id' => 'vertical-navigation'));
        } else {
            printf('<ul id="vertical-navigation"><li><a href="%s">%s</a></li></ul>', admin_url('nav-menus.php'), esc_html__("Define your site vertical menu!", 'cruxstore'));
        }
        $output .= ob_get_clean();
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Vertical Navigation Menu", 'cruxstore'), "base" => "vertical_menu", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array(vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer')))));
示例#7
0
                }
            }
            $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $new_args, $atts));
            $woocommerce_loop['columns'] = $desktop;
            $woocommerce_loop['type'] = $product_type;
            ob_start();
            if ($products->have_posts()) {
                woocommerce_product_loop_start();
                if ($product_type == 'masonry') {
                    echo '<div class="clearfix product col-sm-3 grid-sizer"></div>';
                }
                while ($products->have_posts()) {
                    $products->the_post();
                    wc_get_template_part('content', 'product');
                }
                // end of the loop.
                woocommerce_product_loop_end();
            }
            wp_reset_postdata();
            $class = $active_section == $i ? 'fade in active' : '';
            $output_content .= sprintf('<div id="%s" class="tab-pane %s">%s</div><!-- .tab-pane -->', 'tab-' . $tab . '-' . $uniqeID, $class, ob_get_clean());
            $i++;
        }
        $output = sprintf('<div class="wc-products-tab-heading">%s</div><div class="tab-content">%s</div>', $tab_heading, $output_content);
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        $output = '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
        return $output;
    }
}
vc_map(array("name" => esc_html__("KT: Products Tab", 'cruxstore'), "base" => "products_tab", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array(array("type" => "cruxstore_heading", "heading" => esc_html__("Data settings", 'cruxstore'), "param_name" => "data_settings"), array("type" => "dropdown", "heading" => esc_html__("Data source", 'cruxstore'), "param_name" => "source", "value" => array(esc_html__('Widgets', 'cruxstore') => 'widgets', esc_html__('Specific Categories', 'cruxstore') => 'categories'), 'std' => 'widgets', "admin_label" => true, "description" => esc_html__("Select content type for your posts.", 'cruxstore')), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'product_cat', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array('', esc_html__('Date', 'js_composer') => 'date', esc_html__('ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Modified', 'js_composer') => 'modified', esc_html__('Random', 'js_composer') => 'rand', esc_html__('Comment count', 'js_composer') => 'comment_count', esc_html__('Menu order', 'js_composer') => 'menu_order'), 'save_always' => true, "dependency" => array("element" => "source", "value" => 'categories'), 'description' => sprintf(esc_html__('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' => esc_html__('Sort order', 'js_composer'), 'param_name' => 'order', 'value' => array('', esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), 'save_always' => true, "dependency" => array("element" => "source", "value" => 'categories'), 'description' => sprintf(esc_html__('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' => esc_html__('Product display type', 'cruxstore'), 'param_name' => 'product_type', 'value' => array(esc_html__('Standard', 'js_composer') => 'classic', esc_html__('Gallery', 'js_composer') => 'gallery', esc_html__('Masonry', 'js_composer') => 'masonry'), 'std' => 'classic', 'description' => '', 'admin_label' => true), array('type' => 'dropdown', 'heading' => esc_html__('Columns', 'cruxstore'), 'param_name' => 'desktop', 'value' => array(esc_html__('1 column', 'js_composer') => '1', esc_html__('2 columns', 'js_composer') => '2', esc_html__('3 columns', 'js_composer') => '3', esc_html__('4 columns', 'js_composer') => '4', esc_html__('6 columns', 'js_composer') => '6'), 'std' => '4', 'description' => esc_html__('The columns attribute controls how many columns wide the products should be before wrapping.', 'cruxstore')), array('type' => 'textfield', 'heading' => esc_html__('Per page', 'js_composer'), 'value' => 8, 'param_name' => 'per_page', 'description' => esc_html__('The "per_page" shortcode determines how many products to show on the page', 'js_composer')), array("type" => "cruxstore_heading", "heading" => esc_html__("Others settings", 'cruxstore'), "param_name" => "others_settings"), array('type' => 'dropdown', 'heading' => esc_html__('Style Nav', 'cruxstore'), 'param_name' => 'style', 'value' => array(esc_html__('Style 1', 'cruxstore') => '1', esc_html__('Style 2', 'cruxstore') => '2', esc_html__('Style 3', 'cruxstore') => '3', esc_html__('Style 4', 'cruxstore') => '4'), 'std' => 1, 'description' => esc_html__('Select your style.', 'cruxstore'), "admin_label" => true), array("type" => "cruxstore_number", "heading" => esc_html__("Active section", 'cruxstore'), "param_name" => "active_section", "value" => "1", 'description' => esc_html__("Enter active section number (Note: to have all sections closed on initial load enter non-existing number).", 'cruxstore')), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer')))));
示例#8
0
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
class WPBakeryShortCode_CruxStore_Instagram extends WPBakeryShortCode
{
    protected function content($atts, $content = null)
    {
        $atts = shortcode_atts(array('username' => '', 'number' => '9', 'size' => 'thumbnail', 'target' => '_self', 'css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $output = '';
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'cruxstore-instagram', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation));
        $type = 'null_instagram_widget';
        $args = array('username' => $username, 'number' => $number, 'size' => $size, 'target' => $target);
        global $wp_widget_factory;
        // to avoid unwanted warnings let's check before using widget
        if (is_object($wp_widget_factory) && isset($wp_widget_factory->widgets, $wp_widget_factory->widgets[$type])) {
            ob_start();
            the_widget($type, $atts, $args);
            $output .= ob_get_clean();
        } else {
            $output .= $this->debugComment('Widget ' . esc_attr($type) . 'Not found in : vc_wp_search');
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
    }
}
// Add your Visual Composer logic here
vc_map(array('name' => 'KT: ' . __('Instagram', 'cruxstore'), 'base' => 'cruxstore_instagram', "category" => esc_html__('by Kite-Themes', 'cruxstore'), "description" => esc_html__("Displays your latest Instagram photos", 'cruxstore'), 'params' => array(array('type' => 'textfield', 'heading' => esc_html__('Username', 'js_composer'), 'value' => '', 'param_name' => 'username', "admin_label" => true), array('type' => 'textfield', 'heading' => esc_html__('Number of photos', 'js_composer'), 'value' => '9', 'param_name' => 'number', "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Photo size', 'js_composer'), 'param_name' => 'size', 'value' => array(esc_html__('Thumbnail', 'js_composer') => 'thumbnail', esc_html__('Small', 'js_composer') => 'small', esc_html__('Large', 'js_composer') => 'large', esc_html__('Original', 'js_composer') => 'original'), 'std' => 'thumbnail', "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Open links in', 'js_composer'), 'param_name' => 'target', 'value' => array(esc_html__('Current window (_self)', 'js_composer') => '_self', esc_html__('New window (_blank)', 'js_composer') => '_blank'), 'std' => 'name', "admin_label" => true), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer')))));
示例#9
0
        } elseif ($source == 'authors') {
            if ($authors) {
                $authors_arr = array_filter(explode(',', $authors));
                if (count($authors_arr)) {
                    $args['author__in'] = $authors_arr;
                }
            }
        }
        ob_start();
        query_posts($args);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                get_template_part('templates/blog/carousel/content', $loop_stype);
            }
            echo "</div><!-- .blog-posts -->";
        }
        wp_reset_query();
        remove_filter('excerpt_length', $exl_function, 999);
        $post_carousel_html = ob_get_clean();
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'blog-posts-carousel-wrapper ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        $output = '';
        $carousel_ouput = cruxstore_render_carousel(apply_filters('cruxstore_render_args', $atts));
        $output .= str_replace('%carousel_html%', $post_carousel_html, $carousel_ouput);
        return '<div class="' . esc_attr($elementClass) . '"><div class="blog-posts blog-posts-carousel">' . $output . '</div></div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Blog Posts Carousel", 'cruxstore'), "base" => "blog_posts_carousel", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array_merge(array(array('type' => 'dropdown', 'heading' => esc_html__('Loop Style', 'cruxstore'), 'param_name' => 'loop_stype', 'value' => array(esc_html__('Style 1', 'js_composer') => 'grid', esc_html__('Style 2', 'js_composer') => 'carousel'), 'std' => 'grid', 'description' => '', 'admin_label' => true), array("type" => "cruxstore_heading", "heading" => esc_html__("Layout setting", 'cruxstore'), "param_name" => "layout_settings"), array('type' => 'textfield', 'heading' => esc_html__('Excerpt length', 'js_composer'), 'value' => 15, 'param_name' => 'excerpt_length'), array("type" => "cruxstore_heading", "heading" => esc_html__("Extra setting", 'cruxstore'), "param_name" => "extra_settings"), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array("type" => "dropdown", "heading" => esc_html__("Data source", 'cruxstore'), "param_name" => "source", "value" => array(esc_html__('All', 'cruxstore') => '', esc_html__('Specific Categories', 'cruxstore') => 'categories', esc_html__('Specific Posts', 'cruxstore') => 'posts', esc_html__('Specific Authors', 'cruxstore') => 'authors'), "admin_label" => true, 'std' => '', "description" => esc_html__("Select content type for your posts.", 'cruxstore'), 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'category', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true, 'select' => 'id', 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_posts", 'args' => array('post_type' => 'post', 'posts_per_page' => -1), 'heading' => esc_html__('Specific Posts', 'js_composer'), 'param_name' => 'posts', 'size' => '5', 'placeholder' => esc_html__('Select your posts', 'js_composer'), "dependency" => array("element" => "source", "value" => array('posts')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_authors", 'post_type' => 'post', 'heading' => esc_html__('Specific Authors', 'js_composer'), 'param_name' => 'authors', 'size' => '5', 'placeholder' => esc_html__('Select your authors', 'js_composer'), "dependency" => array("element" => "source", "value" => array('authors')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'textfield', 'heading' => esc_html__('Total items', 'js_composer'), 'param_name' => 'max_items', 'value' => 10, 'param_holder_class' => 'vc_not-for-custom', 'description' => esc_html__('Set max limit for items in grid or enter -1 to display all (limited to 1000).', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(esc_html__('Date', 'js_composer') => 'date', esc_html__('Order by post ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Last modified date', 'js_composer') => 'modified', esc_html__('Post/page parent ID', 'js_composer') => 'parent', esc_html__('Number of comments', 'js_composer') => 'comment_count', esc_html__('Menu order/Page Order', 'js_composer') => 'menu_order', esc_html__('Meta value', 'js_composer') => 'meta_value', esc_html__('Meta value number', 'js_composer') => 'meta_value_num', esc_html__('Random order', 'js_composer') => 'rand'), 'description' => esc_html__('Select order type. If "Meta value" or "Meta value Number" is chosen then meta key is required.', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', "admin_label" => true), array('type' => 'textfield', 'heading' => esc_html__('Meta key', 'js_composer'), 'param_name' => 'meta_key', 'group' => esc_html__('Data settings', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'dependency' => array('element' => 'orderby', 'value' => array('meta_value', 'meta_value_num')), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Sorting', 'js_composer'), 'param_name' => 'order', 'group' => esc_html__('Data settings', 'js_composer'), 'value' => array(esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'description' => esc_html__('Select sorting order.', 'js_composer'), "admin_label" => true)), cruxstore_map_add_carousel_parrams(), array(array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer'))))));
示例#10
0
                    $socials .= sprintf('<a href="%s" target="_blank">%s</a>', $instagram, '<i class="fa fa-instagram" aria-hidden="true"></i>');
                }
                if ($socials) {
                    $socials = '<div class="employees-socials">' . $socials . '</div>';
                }
                $image = get_the_post_thumbnail(get_the_ID(), 'cruxstore_square');
                if (!$image) {
                    $image = '<img class="vc_img-placeholder img-responsive" src="' . vc_asset_url('vc/no_image.png') . '" />';
                }
                if ($layout == 'gallery') {
                    $image = '<div class="employees-img">' . $image . ' </div>';
                    $employees = sprintf('%s <div class="employees-infos">%s %s</div>', $image, $title, $subtitle . $socials);
                } else {
                    $image = '<div class="employees-img">' . $image . $socials . ' </div>';
                    $employees = sprintf('%s <div class="employees-infos">%s %s</div>', $image, $title, $subtitle);
                }
                $output .= sprintf('<div class="employees-content col-lg-%1$s col-md-%1$s col-sm-%2$s col-xs-%2$s"><div class="employees-inner">%3$s</div></div>', $article_columns, $article_columns_tab, $employees);
            }
            wp_reset_postdata();
        }
        $rowclass = 'row multi-columns-row';
        if ($columns_gap == '' || $columns_gap == '0') {
            $rowclass .= ' no-gutters';
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '"><div class="' . $rowclass . '">' . $output . '</div></div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Employees", 'cruxstore'), "base" => "employees", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "description" => esc_html__("", 'cruxstore'), "params" => array(array("type" => "textfield", 'heading' => esc_html__('Title', 'js_composer'), 'param_name' => 'title', 'value' => esc_html__('Title', 'js_composer'), "admin_label" => true), array("type" => "dropdown", "heading" => esc_html__("Layout", 'cruxstore'), "param_name" => "layout", "value" => array(esc_html__('Square', 'cruxstore') => 'square', esc_html__('Circle', 'cruxstore') => 'circle', esc_html__('Gallery', 'cruxstore') => 'gallery'), "admin_label" => true, 'std' => 'square', "description" => esc_html__("Select your layout.", 'cruxstore')), array("type" => "dropdown", "heading" => esc_html__("Columns gap", 'cruxstore'), "param_name" => "columns_gap", "value" => array(esc_html__('0px', 'cruxstore') => '0', esc_html__('15px', 'cruxstore') => '15'), 'std' => '15', "description" => esc_html__(" Select gap between columns in row.", 'cruxstore')), array("type" => "cruxstore_heading", "heading" => esc_html__("Columns to Show?", 'cruxstore'), "edit_field_class" => "cruxstore_sub_heading vc_column", "param_name" => "items_show"), array('type' => 'dropdown', 'heading' => esc_html__('on Desktop', 'cruxstore'), 'param_name' => 'employees_columns', 'value' => array(esc_html__('2 columns', 'js_composer') => '2', esc_html__('3 columns', 'js_composer') => '3', esc_html__('4 columns', 'js_composer') => '4', esc_html__('6 columns', 'js_composer') => '6'), 'std' => '3', "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('on Tablet', 'cruxstore'), 'param_name' => 'employees_columns_tab', 'value' => array(esc_html__('2 columns', 'js_composer') => '2', esc_html__('3 columns', 'js_composer') => '3', esc_html__('4 columns', 'js_composer') => '4'), 'std' => '2'), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array("type" => "dropdown", "heading" => esc_html__("Data source", 'cruxstore'), "param_name" => "source", "value" => array(esc_html__('All', 'cruxstore') => '', esc_html__('Specific Categories', 'cruxstore') => 'categories', esc_html__('Specific Posts', 'cruxstore') => 'posts'), "admin_label" => true, 'std' => 'all', "description" => esc_html__("Select content type for your posts.", 'cruxstore'), 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'employees-category', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'select' => 'id', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_posts", 'args' => array('post_type' => 'crux_employees', 'posts_per_page' => -1), 'heading' => esc_html__('Specific Posts', 'js_composer'), 'param_name' => 'posts', 'size' => '5', 'placeholder' => esc_html__('Select your posts', 'js_composer'), "dependency" => array("element" => "source", "value" => array('posts')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'textfield', 'heading' => esc_html__('Total items', 'js_composer'), 'param_name' => 'max_items', 'value' => 10, 'param_holder_class' => 'vc_not-for-custom', 'description' => esc_html__('Set max limit for items in grid or enter -1 to display all (limited to 1000).', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(esc_html__('Date', 'js_composer') => 'date', esc_html__('Order by post ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Last modified date', 'js_composer') => 'modified', esc_html__('Post/page parent ID', 'js_composer') => 'parent', esc_html__('Number of comments', 'js_composer') => 'comment_count', esc_html__('Menu order/Page Order', 'js_composer') => 'menu_order', esc_html__('Meta value', 'js_composer') => 'meta_value', esc_html__('Meta value number', 'js_composer') => 'meta_value_num', esc_html__('Random order', 'js_composer') => 'rand'), 'description' => esc_html__('Select order type. If "Meta value" or "Meta value Number" is chosen then meta key is required.', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', "admin_label" => true), array('type' => 'textfield', 'heading' => esc_html__('Meta key', 'js_composer'), 'param_name' => 'meta_key', 'description' => esc_html__('Input meta key for grid ordering.', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'dependency' => array('element' => 'orderby', 'value' => array('meta_value', 'meta_value_num')), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Sorting', 'js_composer'), 'param_name' => 'order', 'group' => esc_html__('Data settings', 'js_composer'), 'value' => array(esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'description' => esc_html__('Select sorting order.', 'js_composer'), "admin_label" => true), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer')))));
示例#11
0
<?php

$colors_arr = vc_colors_arr();
$icons_arr = vc_icons_arr();
$size_arr = vc_size_arr();
return array('name' => __('Call to Action', 'js_composer'), 'base' => 'vc_cta_button', 'icon' => 'icon-wpb-call-to-action', 'deprecated' => '4.5', 'category' => __('Content', 'js_composer'), 'description' => __('Catch visitors attention with CTA block', 'js_composer'), 'params' => array(array('type' => 'textarea', 'admin_label' => true, 'heading' => __('Text', 'js_composer'), 'param_name' => 'call_text', 'value' => __('Click edit button to change this text.', 'js_composer'), 'description' => __('Enter text content.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Text on the button', 'js_composer'), 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer'), 'description' => __('Enter text on the button.', 'js_composer')), array('type' => 'href', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'href', 'description' => __('Enter button link.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Target', 'js_composer'), 'param_name' => 'target', 'value' => vc_target_param_list(), 'dependency' => array('element' => 'href', 'not_empty' => true, 'callback' => 'vc_cta_button_param_target_callback')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => $colors_arr, 'description' => __('Select button color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Button icon', 'js_composer'), 'param_name' => 'icon', 'value' => $icons_arr, 'description' => __('Select icon to display on button.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => $size_arr, 'description' => __('Select button size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Button position', 'js_composer'), 'param_name' => 'position', 'value' => array(__('Right', 'js_composer') => 'cta_align_right', __('Left', 'js_composer') => 'cta_align_left', __('Bottom', 'js_composer') => 'cta_align_bottom'), 'description' => __('Select button alignment.', 'js_composer')), vc_map_add_css_animation(), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer'))), 'js_view' => 'VcCallToActionView');
示例#12
0
        } else {
            $color = cruxstore_color2Hex($color);
        }
        $custom_css .= '#' . $uniqid . ' > ul > li:before{color: ' . $color . ';}';
        if (strlen($background_style) > 0) {
            if ($background_color == 'custom') {
                $background_color = $custom_background_color;
            } else {
                $background_color = cruxstore_color2Hex($background_color);
            }
            if (false !== strpos($background_style, 'outline')) {
                $background_style .= ' list-outline';
                // if we use outline style it is border in css
                $custom_css .= '#' . $uniqid . ' > ul > li:before{border-color:' . $background_color . ';}';
            } else {
                $background_style .= ' list-background';
                $custom_css .= '#' . $uniqid . ' > ul > li:before{background:' . $background_color . ';}';
            }
            $elementClass[] = 'bg-style-' . $background_style;
            $elementClass[] = 'bg-style';
        }
        if ($custom_css) {
            $custom_css = '<div class="cruxstore_custom_css" data-css="' . esc_attr($custom_css) . '"></div>';
        }
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div id="' . $uniqid . '" class="' . esc_attr($elementClass) . '">' . $content . $custom_css . '</div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Fancy List", 'cruxstore'), "base" => "cruxstore_list", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "description" => esc_html__("", 'cruxstore'), "params" => array(array("type" => "textarea_html", "heading" => esc_html__("Content", 'cruxstore'), "param_name" => "content", "description" => esc_html__("", 'cruxstore'), 'holder' => 'div', 'std' => '<ul><li>List Item</li><li>list Item</li></ul>'), array('type' => 'dropdown', 'heading' => esc_html__('List style', 'cruxstore'), 'param_name' => 'style', 'value' => array(esc_html__('Check', 'cruxstore') => 'check', esc_html__('Numbers', 'cruxstore') => 'numbers', esc_html__('Angle Right ', 'cruxstore') => 'angle-right', esc_html__('Dot', 'cruxstore') => 'dot'), 'std' => 'check', 'description' => esc_html__('select your style', 'cruxstore'), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Icon color', 'js_composer'), 'param_name' => 'color', 'value' => array_merge(array(esc_html__('Default', 'js_composer') => 'default'), array(esc_html__('Accent color', 'cruxstore') => 'accent'), getVcShared('colors'), array(esc_html__('Custom color', 'js_composer') => 'custom')), 'description' => esc_html__('Select icon color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown', 'std' => 'black'), array('type' => 'colorpicker', 'heading' => esc_html__('Custom color', 'js_composer'), 'param_name' => 'custom_color', 'description' => esc_html__('Select custom icon color.', 'js_composer'), 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => esc_html__('Background shape', 'js_composer'), 'param_name' => 'background_style', 'value' => array(esc_html__('None', 'js_composer') => '', esc_html__('Circle', 'js_composer') => 'rounded', esc_html__('Square', 'js_composer') => 'boxed', esc_html__('Rounded', 'js_composer') => 'rounded-less', esc_html__('Outline Circle', 'js_composer') => 'rounded-outline', esc_html__('Outline Square', 'js_composer') => 'boxed-outline', esc_html__('Outline Rounded', 'js_composer') => 'rounded-less-outline'), 'description' => esc_html__('Select background shape and style for icon.', 'js_composer')), array('type' => 'dropdown', 'heading' => esc_html__('Background color', 'js_composer'), 'param_name' => 'background_color', 'value' => array_merge(array(esc_html__('Accent color', 'cruxstore') => 'accent'), getVcShared('colors'), array(esc_html__('Custom color', 'js_composer') => 'custom')), 'std' => 'grey', 'description' => esc_html__('Select background color for icon.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown', 'dependency' => array('element' => 'background_style', 'not_empty' => true)), array('type' => 'colorpicker', 'heading' => esc_html__('Custom background color', 'js_composer'), 'param_name' => 'custom_background_color', 'description' => esc_html__('Select custom icon background color.', 'js_composer'), 'dependency' => array('element' => 'background_color', 'value' => 'custom')), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'css_editor', 'heading' => esc_html__('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design Options', 'js_composer')))));
示例#13
0
        $output = $carousel_html = '';
        ob_start();
        $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $args, $atts));
        if ($products->have_posts()) {
            global $woocommerce_loop;
            $woocommerce_loop['columns'] = $desktop;
            $carousel_ouput = cruxstore_render_carousel(apply_filters('cruxstore_render_args', $atts), '', 'wc-carousel-wrapper');
            if ($layout == 'transparent') {
                $woocommerce_loop['type'] = 'transparent';
            } else {
                $woocommerce_loop['type'] = 'normal';
            }
            woocommerce_product_loop_start();
            while ($products->have_posts()) {
                $products->the_post();
                wc_get_template_part('content', 'product');
            }
            // end of the loop.
            woocommerce_product_loop_end();
        }
        $carousel_html .= ob_get_clean();
        wp_reset_postdata();
        if ($carousel_html) {
            $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
            $output = '<div class="' . esc_attr($elementClass) . '">' . str_replace('%carousel_html%', $carousel_html, $carousel_ouput) . '</div>';
        }
        return $output;
    }
}
vc_map(array("name" => esc_html__("KT: Products Carousel", 'cruxstore'), "base" => "products_carousel", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array_merge(array(array('type' => 'dropdown', "heading" => esc_html__("Product layout", 'cruxstore'), 'param_name' => 'layout', 'value' => array(esc_html__('Normal', 'woocommerce') => 'normal', esc_html__('Transparent', 'js_composer') => 'transparent'), 'std' => 'normal', 'description' => esc_html__('Select your product layout.', 'cruxstore')), array("type" => "cruxstore_heading", "heading" => esc_html__("Data settings", 'cruxstore'), "param_name" => "data_settings"), array('type' => 'dropdown', "heading" => esc_html__("Data source", 'cruxstore'), 'param_name' => 'source', 'value' => array(esc_html__('All Product', 'woocommerce') => 'all', esc_html__('Featured Products', 'js_composer') => 'featured', esc_html__('On-sale Products', 'js_composer') => 'onsale', esc_html__('Best Sellers', 'js_composer') => 'best-sellers', esc_html__('Specific Categories', 'js_composer') => 'categories', esc_html__('Specific Products', 'js_composer') => 'products'), 'std' => 'all', 'description' => esc_html__('Select your source', 'cruxstore')), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'product_cat', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true), array("type" => "cruxstore_posts", 'args' => array('post_type' => 'product', 'posts_per_page' => -1), 'heading' => esc_html__('Specific Products', 'js_composer'), 'param_name' => 'products', 'size' => '5', 'placeholder' => esc_html__('Select your posts', 'js_composer'), "dependency" => array("element" => "source", "value" => array('products')), 'multiple' => true), array('type' => 'textfield', 'heading' => esc_html__('Per page', 'js_composer'), 'value' => 10, 'param_name' => 'per_page', 'description' => esc_html__('The "per_page" shortcode determines how many products to show on the page', 'js_composer'), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(esc_html__('Date', 'js_composer') => 'date', esc_html__('Order by post ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Last modified date', 'js_composer') => 'modified', esc_html__('Post/page parent ID', 'js_composer') => 'parent', esc_html__('Number of comments', 'js_composer') => 'comment_count', esc_html__('Menu order/Page Order', 'js_composer') => 'menu_order', esc_html__('Meta value', 'js_composer') => 'meta_value', esc_html__('Meta value number', 'js_composer') => 'meta_value_num', esc_html__('Random order', 'js_composer') => 'rand'), "dependency" => array("element" => "source", "value" => 'all'), 'description' => esc_html__('Select order type. If "Meta value" or "Meta value Number" is chosen then meta key is required.', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', "admin_label" => true), array('type' => 'textfield', 'heading' => esc_html__('Meta key', 'js_composer'), 'param_name' => 'meta_key', 'param_holder_class' => 'vc_grid-data-type-not-ids', 'dependency' => array('element' => 'orderby', 'value' => array('meta_value', 'meta_value_num')), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Sorting', 'js_composer'), 'param_name' => 'order', 'value' => array(esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), "dependency" => array("element" => "source", "value" => 'all'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'description' => esc_html__('Select sorting order.', 'js_composer'), "admin_label" => true), array("type" => "cruxstore_heading", "heading" => esc_html__("Others settings", 'cruxstore'), "param_name" => "others_settings"), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), cruxstore_map_add_carousel_parrams(), array(array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer'))))));
示例#14
0
if (!defined('ABSPATH')) {
    die('-1');
}
/**
 * New button implementation
 * array_merge is needed due to merging other shortcode data into params.
 * @since 4.5
 */
global $pixel_icons;
$icons_params = vc_map_integrate_shortcode('vc_icon', 'i_', '', array('include_only_regex' => '/^(type|icon_\\w*)/'), array('element' => 'add_icon', 'value' => 'true'));
// populate integrated vc_icons params.
if (is_array($icons_params) && !empty($icons_params)) {
    foreach ($icons_params as $key => $param) {
        if (is_array($param) && !empty($param)) {
            if ('i_type' === $param['param_name']) {
                // append pixelicons to dropdown
                $icons_params[$key]['value'][__('Pixel', 'js_composer')] = 'pixelicons';
            }
            if (isset($param['admin_label'])) {
                // remove admin label
                unset($icons_params[$key]['admin_label']);
            }
        }
    }
}
$params = array_merge(array(array('type' => 'textfield', 'heading' => __('Text', 'js_composer'), 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer')), array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Add link to button.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'description' => __('Select button display style.', 'js_composer'), 'param_name' => 'style', 'value' => array(__('Modern', 'js_composer') => 'modern', __('Classic', 'js_composer') => 'classic', __('Flat', 'js_composer') => 'flat', __('Outline', 'js_composer') => 'outline', __('3d', 'js_composer') => '3d', __('Custom', 'js_composer') => 'custom', __('Outline custom', 'js_composer') => 'outline-custom')), array('type' => 'colorpicker', 'heading' => __('Background', 'js_composer'), 'param_name' => 'custom_background', 'description' => __('Select custom background color for your element.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column', 'std' => '#ededed'), array('type' => 'colorpicker', 'heading' => __('Text', 'js_composer'), 'param_name' => 'custom_text', 'description' => __('Select custom text color for your element.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column', 'std' => '#666'), array('type' => 'colorpicker', 'heading' => __('Outline and Text', 'js_composer'), 'param_name' => 'outline_custom_color', 'description' => __('Select outline and text color for your element.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('outline-custom')), 'edit_field_class' => 'vc_col-sm-4 vc_column', 'std' => '#666'), array('type' => 'colorpicker', 'heading' => __('Hover background', 'js_composer'), 'param_name' => 'outline_custom_hover_background', 'description' => __('Select hover background color for your element.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('outline-custom')), 'edit_field_class' => 'vc_col-sm-4 vc_column', 'std' => '#666'), array('type' => 'colorpicker', 'heading' => __('Hover text', 'js_composer'), 'param_name' => 'outline_custom_hover_text', 'description' => __('Select hover text color for your element.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('outline-custom')), 'edit_field_class' => 'vc_col-sm-4 vc_column', 'std' => '#fff'), array('type' => 'dropdown', 'heading' => __('Shape', 'js_composer'), 'description' => __('Select button shape.', 'js_composer'), 'param_name' => 'shape', 'value' => array(__('Rounded', 'js_composer') => 'rounded', __('Square', 'js_composer') => 'square', __('Round', 'js_composer') => 'round')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'description' => __('Select button color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown vc_btn3-colored-dropdown', 'value' => array(__('Classic Grey', 'js_composer') => 'default', __('Classic Blue', 'js_composer') => 'primary', __('Classic Turquoise', 'js_composer') => 'info', __('Classic Green', 'js_composer') => 'success', __('Classic Orange', 'js_composer') => 'warning', __('Classic Red', 'js_composer') => 'danger', __('Classic Black', 'js_composer') => 'inverse') + getVcShared('colors-dashed'), 'std' => 'grey', 'dependency' => array('element' => 'style', 'value_not_equal_to' => array('custom', 'outline-custom'))), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'description' => __('Select button display size.', 'js_composer'), 'std' => 'md', 'value' => getVcShared('sizes')), array('type' => 'dropdown', 'heading' => __('Alignment', 'js_composer'), 'param_name' => 'align', 'description' => __('Select button alignment.', 'js_composer'), 'value' => array(__('Inline', 'js_composer') => 'inline', __('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right', __('Center', 'js_composer') => 'center')), array('type' => 'checkbox', 'heading' => __('Set full width button?', 'js_composer'), 'param_name' => 'button_block', 'dependency' => array('element' => 'align', 'value_not_equal_to' => 'inline')), array('type' => 'checkbox', 'heading' => __('Add icon?', 'js_composer'), 'param_name' => 'add_icon'), array('type' => 'dropdown', 'heading' => __('Icon Alignment', 'js_composer'), 'description' => __('Select icon alignment.', 'js_composer'), 'param_name' => 'i_align', 'value' => array(__('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right'), 'dependency' => array('element' => 'add_icon', 'value' => 'true'))), $icons_params, array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'i_icon_pixelicons', 'value' => 'vc_pixel_icon vc_pixel_icon-alert', 'settings' => array('emptyIcon' => false, 'type' => 'pixelicons', 'source' => $pixel_icons), 'dependency' => array('element' => 'i_type', 'value' => 'pixelicons'), 'description' => __('Select icon from library.', 'js_composer'))), array(vc_map_add_css_animation(true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer'))));
/**
 * @class WPBakeryShortCode_VC_Btn
 */
vc_map(array('name' => __('Button', 'js_composer'), 'base' => 'vc_btn', 'icon' => 'icon-wpb-ui-button', 'category' => array(__('Content', 'js_composer')), 'description' => __('Eye catching button', 'js_composer'), 'params' => $params, 'js_view' => 'VcButton3View', 'custom_markup' => '{{title}}<div class="vc_btn3-container"><button class="vc_general vc_btn3 vc_btn3-size-sm vc_btn3-shape-{{ params.shape }} vc_btn3-style-{{ params.style }} vc_btn3-color-{{ params.color }}">{{{ params.title }}}</button></div>'));
示例#15
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
class WPBakeryShortCode_CruxStore_Wrapper extends WPBakeryShortCodesContainer
{
    protected function content($atts, $content = null)
    {
        $atts = shortcode_atts(array('max_width' => 950, 'css_animation' => '', 'align' => 'center', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'cruxstore-wrapper', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'align' => 'cruxstore-wrapper-' . $align);
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '" style="max-width: ' . $max_width . 'px;">' . do_shortcode($content) . '</div>';
    }
}
//Register "container" content element. It will hold all your inner (child) content elements
vc_map(array("name" => esc_html__("KT: Wrapper", 'cruxstore'), "base" => "cruxstore_wrapper", "category" => esc_html__('by Kite-Themes', 'cruxstore'), 'is_container' => true, "content_element" => true, "show_settings_on_create" => true, "js_view" => 'VcColumnView', "params" => array(array("type" => "cruxstore_number", "heading" => esc_html__("Max width", 'cruxstore'), "param_name" => "max_width", "value" => 950, "suffix" => esc_html__("px", 'cruxstore'), 'description' => esc_html__('Select max-width for element.', 'cruxstore')), array('type' => 'dropdown', 'heading' => esc_html__('Align', 'js_composer'), 'param_name' => 'align', 'admin_label' => true, 'value' => array(esc_html__('Center', 'js_composer') => '', esc_html__('Left', 'js_composer') => 'left', esc_html__('Right', 'js_composer') => 'right'), 'description' => esc_html__('Select wrapper alignment.', 'cruxstore')), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer')))));
示例#16
0
<?php

/**
 * New button implementation
 * array_merge is needed due to merging other shortcode data into params.
 * @since 4.5
 */
global $pixel_icons;
$icons_params = vc_map_integrate_shortcode('vc_icon', 'i_', '', array('include_only_regex' => '/^(type|icon_\\w*)/'), array('element' => 'add_icon', 'value' => 'true'));
// populate integrated vc_icons params.
if (is_array($icons_params) && !empty($icons_params)) {
    foreach ($icons_params as $key => $param) {
        if (is_array($param) && !empty($param)) {
            if ($param['param_name'] == 'i_type') {
                // append pixelicons to dropdown
                $icons_params[$key]['value'][__('Pixel', 'js_composer')] = 'pixelicons';
            }
            if (isset($param['admin_label'])) {
                // remove admin label
                unset($icons_params[$key]['admin_label']);
            }
        }
    }
}
$params = array_merge(array(array('type' => 'textfield', 'heading' => __('Text Button', 'js_composer'), 'save_always' => true, 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer')), array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Add link to button.', 'js_composer')), array("type" => "dropdown", "class" => "", "heading" => __("Button Type", 'leonard'), "param_name" => "button_type", "value" => array('Button Default' => 'btn btn-default', 'Button Primary' => 'btn btn-primary', 'Button Primary Transparent' => 'btn btn-primary-transparent', 'Button White' => 'btn btn-white', 'Button White Transparent' => 'btn btn-white-transparent', 'Button Gray' => 'btn btn-gray', 'Button Gray Transparent' => 'btn btn-gray-transparent', 'Button Black' => 'btn btn-black', 'Button Green' => 'btn btn-green', 'Button Purple' => 'btn btn-purple', 'Button Crimson' => 'btn btn-crimson')), array('type' => 'textfield', 'heading' => __('Padding', 'js_composer'), 'param_name' => 'padding', 'description' => __('Ex: 15px 35px 15px 35px.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Border', 'js_composer'), 'param_name' => 'border', 'value' => array(__('1px', 'js_composer') => '', __('2px', 'js_composer') => 'btn-border-2')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => array(__('Default', 'js_composer') => '', __('Style 1', 'js_composer') => 'btn-style-1', __('Style 2', 'js_composer') => 'btn-style-2', __('Style 3', 'js_composer') => 'btn-style-3', __('Style 4', 'js_composer') => 'btn-style-4', __('Style 5', 'js_composer') => 'btn-style-5')), array('type' => 'dropdown', 'heading' => __('Letter Spacing', 'js_composer'), 'param_name' => 'letter_spacing', 'value' => array(__('Default', 'js_composer') => '', __('Letter Spacing 50', 'js_composer') => '0.05em', __('Letter Spacing 100', 'js_composer') => '0.1em', __('Letter Spacing 200', 'js_composer') => '0.2em', __('Letter Spacing 300', 'js_composer') => '0.3em', __('Letter Spacing 400', 'js_composer') => '0.4em', __('Letter Spacing 500', 'js_composer') => '0.5em')), array('type' => 'textfield', 'heading' => __('Radius', 'js_composer'), 'param_name' => 'radius', 'description' => __('Ex: 15px 35px 15px 35px.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Alignment', 'js_composer'), 'param_name' => 'align', 'description' => __('Select button alignment.', 'js_comopser'), 'value' => array(__('Inline', 'js_composer') => 'inline', __('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right', __('Center', 'js_composer') => 'center')), array('type' => 'checkbox', 'heading' => __('Set full width button?', 'js_composer'), 'param_name' => 'button_block', 'dependency' => array('element' => 'align', 'value_not_equal_to' => 'inline')), array('type' => 'checkbox', 'heading' => __('Add icon?', 'js_composer'), 'param_name' => 'add_icon'), array('type' => 'dropdown', 'heading' => __('Icon Alignment', 'js_composer'), 'description' => __('Select icon alignment.', 'js_composer'), 'param_name' => 'i_align', 'value' => array(__('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right'), 'dependency' => array('element' => 'add_icon', 'value' => 'true'))), $icons_params, array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'i_icon_pixelicons', 'settings' => array('emptyIcon' => false, 'type' => 'pixelicons', 'source' => $pixel_icons), 'dependency' => array('element' => 'i_type', 'value' => 'pixelicons'), 'description' => __('Select icon from library.', 'js_composer'))), array(vc_map_add_css_animation(true), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer'))));
/**
 * @class WPBakeryShortCode_VC_Btn
 */
vc_map(array('name' => __('Button', 'js_composer'), 'base' => 'vc_btn', 'icon' => 'icon-wpb-ui-button', 'category' => array(__('Content', 'js_composer')), 'description' => __('Eye catching button', 'js_composer'), 'params' => $params, 'js_view' => 'VcButton3View', 'custom_markup' => '{{title}}<div class="vc_btn3-container"><button class="vc_general vc_btn3 vc_btn3-size-sm vc_btn3-shape-{{ params.shape }} vc_btn3-style-{{ params.style }} vc_btn3-color-{{ params.color }}">{{{ params.title }}}</button></div>'));
示例#17
0
<?php

return array('name' => __('Old Call to Action Button', 'js_composer') . ' 2', 'base' => 'vc_cta_button2', 'icon' => 'icon-wpb-call-to-action', 'deprecated' => '4.5', 'content_element' => false, 'category' => array(__('Content', 'js_composer')), 'description' => __('Catch visitors attention with CTA block', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Heading', 'js_composer'), 'admin_label' => true, 'param_name' => 'h2', 'value' => __('Hey! I am first heading line feel free to change me', 'js_composer'), 'description' => __('Enter text for heading line.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Subheading', 'js_composer'), 'param_name' => 'h4', 'value' => '', 'description' => __('Enter text for subheading line.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Shape', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('cta styles'), 'description' => __('Select display shape and style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Width', 'js_composer'), 'param_name' => 'el_width', 'value' => getVcShared('cta widths'), 'description' => __('Select element width (percentage).', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Text alignment', 'js_composer'), 'param_name' => 'txt_align', 'value' => getVcShared('text align'), 'description' => __('Select text alignment in "Call to Action" block.', 'js_composer')), array('type' => 'colorpicker', 'heading' => __('Background color', 'js_composer'), 'param_name' => 'accent_color', 'description' => __('Select background color.', 'js_composer')), array('type' => 'textarea_html', 'heading' => __('Text', 'js_composer'), 'param_name' => 'content', 'value' => __('I am promo text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'js_composer')), array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Add link to button (Important: adding link automatically adds button).', 'js_composer')), array('type' => 'textfield', 'heading' => __('Text on the button', 'js_composer'), 'param_name' => 'title', 'value' => __('Text on the button', 'js_composer'), 'description' => __('Add text on the button.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Shape', 'js_composer'), 'param_name' => 'btn_style', 'value' => getVcShared('button styles'), 'description' => __('Select button display style and shape.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => getVcShared('colors'), 'description' => __('Select button color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => getVcShared('sizes'), 'std' => 'md', 'description' => __('Select button size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Button position', 'js_composer'), 'param_name' => 'position', 'value' => array(__('Right', 'js_composer') => 'right', __('Left', 'js_composer') => 'left', __('Bottom', 'js_composer') => 'bottom'), 'description' => __('Select button alignment.', 'js_composer')), vc_map_add_css_animation(), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer'))));
            if (!empty($categories)) {
                $args['tax_query'] = array(array('taxonomy' => 'product_cat', 'terms' => array_map('sanitize_title', explode(',', $categories)), 'field' => 'slug', 'operator' => $operator));
            }
        } elseif ($source == 'products') {
            if (!empty($atts['products'])) {
                $args['post__in'] = array_map('trim', explode(',', $atts['products']));
            }
        }
        $output = '';
        ob_start();
        global $woocommerce_loop;
        $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $args, $atts));
        $woocommerce_loop['columns'] = $desktop;
        $woocommerce_loop['type'] = 'countdown';
        if ($products->have_posts()) {
            woocommerce_product_loop_start();
            while ($products->have_posts()) {
                $products->the_post();
                wc_get_template_part('content', 'product_sale');
            }
            // end of the loop.
            woocommerce_product_loop_end();
        }
        wp_reset_postdata();
        $output .= ob_get_clean();
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
    }
}
vc_map(array("name" => esc_html__("KT: Products Sale CountDown", 'cruxstore'), "base" => "products_sale_countdown", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "params" => array(array("type" => "cruxstore_heading", "heading" => esc_html__("Layout setting", 'cruxstore'), "param_name" => "layout_settings"), array("type" => "cruxstore_heading", "heading" => esc_html__("Columns to Show?", 'cruxstore'), "edit_field_class" => "cruxstore_sub_heading vc_column", "param_name" => "items_show", 'dependency' => array('element' => 'blog_type', 'value' => array('classic', 'masonry'))), array('type' => 'dropdown', 'heading' => esc_html__('on Desktop', 'cruxstore'), 'param_name' => 'desktop', 'value' => array(esc_html__('3 columns', 'js_composer') => '3', esc_html__('2 columns', 'js_composer') => '2', esc_html__('1 columns', 'js_composer') => '1'), 'std' => '3'), array("type" => "cruxstore_heading", "heading" => esc_html__("Extra setting", 'cruxstore'), "param_name" => "extra_settings"), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array('type' => 'dropdown', 'heading' => esc_html__('Source', 'cruxstore'), 'param_name' => 'source', 'value' => array(esc_html__('All Product', 'woocommerce') => 'all', esc_html__('Specific Categories', 'js_composer') => 'categories', esc_html__('Specific Products', 'js_composer') => 'products'), 'std' => '', 'group' => esc_html__('Data settings', 'cruxstore'), 'description' => esc_html__('Select content type for your posts.', 'cruxstore'), "admin_label" => true), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'product_cat', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_posts", 'args' => array('post_type' => 'product', 'posts_per_page' => -1, 'post__in' => wc_get_product_ids_on_sale()), 'heading' => esc_html__('Specific Products', 'js_composer'), 'param_name' => 'products', 'size' => '5', 'placeholder' => esc_html__('Select your posts', 'js_composer'), "dependency" => array("element" => "source", "value" => array('products')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'textfield', 'heading' => esc_html__('Total items', 'cruxstore'), 'value' => 10, 'param_name' => 'per_page', 'description' => esc_html__('The "per_page" shortcode determines how many products to show on the page', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(esc_html__('Date', 'js_composer') => 'date', esc_html__('Order by post ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Last modified date', 'js_composer') => 'modified', esc_html__('Post/page parent ID', 'js_composer') => 'parent', esc_html__('Number of comments', 'js_composer') => 'comment_count', esc_html__('Menu order/Page Order', 'js_composer') => 'menu_order', esc_html__('Meta value', 'js_composer') => 'meta_value', esc_html__('Meta value number', 'js_composer') => 'meta_value_num', esc_html__('Random order', 'js_composer') => 'rand'), "dependency" => array("element" => "source", "value_not_equal_to" => array('best-sellers')), 'description' => esc_html__('Select order type. If "Meta value" or "Meta value Number" is chosen then meta key is required.', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer'), "admin_label" => true), array('type' => 'textfield', 'heading' => esc_html__('Meta key', 'js_composer'), 'param_name' => 'meta_key', 'group' => esc_html__('Data settings', 'js_composer'), 'dependency' => array('element' => 'orderby', 'value' => array('meta_value', 'meta_value_num')), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Sorting', 'js_composer'), 'param_name' => 'order', 'value' => array(esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), "dependency" => array("element" => "source", "value_not_equal_to" => array('best-sellers')), 'group' => esc_html__('Data settings', 'js_composer'), 'description' => esc_html__('Select sorting order.', 'js_composer'), "admin_label" => true), array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer')))));
<?php

return array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Simple image with CSS animation', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text used as widget title (Note: located above content element).', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Image source', 'js_composer'), 'param_name' => 'source', 'value' => array(__('Media library', 'js_composer') => 'media_library', __('External link', 'js_composer') => 'external_link', __('Featured Image', 'js_composer') => 'featured_image'), 'std' => 'media_library', 'description' => __('Select image source.', 'js_composer')), array('type' => 'attach_image', 'heading' => __('Image', 'js_composer'), 'param_name' => 'image', 'value' => '', 'description' => __('Select image from media library.', 'js_composer'), 'dependency' => array('element' => 'source', 'value' => 'media_library'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('External link', 'js_composer'), 'param_name' => 'custom_src', 'description' => __('Select external link.', 'js_composer'), 'dependency' => array('element' => 'source', 'value' => 'external_link'), 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'img_size', 'value' => 'thumbnail', 'description' => __('Enter image size (Example: "thumbnail", "medium", "large", "full" or other sizes defined by theme). Alternatively enter size in pixels (Example: 200x100 (Width x Height)).', 'js_composer'), 'dependency' => array('element' => 'source', 'value' => array('media_library', 'featured_image'))), array('type' => 'textfield', 'heading' => __('Image size', 'js_composer'), 'param_name' => 'external_img_size', 'value' => '', 'description' => __('Enter image size in pixels. Example: 200x100 (Width x Height).', 'js_composer'), 'dependency' => array('element' => 'source', 'value' => 'external_link')), array('type' => 'textfield', 'heading' => __('Caption', 'js_composer'), 'param_name' => 'caption', 'description' => __('Enter text for image caption.', 'js_composer'), 'dependency' => array('element' => 'source', 'value' => 'external_link')), array('type' => 'checkbox', 'heading' => __('Add caption?', 'js_composer'), 'param_name' => 'add_caption', 'description' => __('Add image caption.', 'js_composer'), 'value' => array(__('Yes', 'js_composer') => 'yes'), 'dependency' => array('element' => 'source', 'value' => array('media_library', 'featured_image'))), array('type' => 'dropdown', 'heading' => __('Image alignment', 'js_composer'), 'param_name' => 'alignment', 'value' => array(__('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right', __('Center', 'js_composer') => 'center'), 'description' => __('Select image alignment.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Image style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('single image styles'), 'description' => __('Select image display style.', 'js_comopser'), 'dependency' => array('element' => 'source', 'value' => array('media_library', 'featured_image'))), array('type' => 'dropdown', 'heading' => __('Image style', 'js_composer'), 'param_name' => 'external_style', 'value' => getVcShared('single image external styles'), 'description' => __('Select image display style.', 'js_comopser'), 'dependency' => array('element' => 'source', 'value' => 'external_link')), array('type' => 'dropdown', 'heading' => __('Border color', 'js_composer'), 'param_name' => 'border_color', 'value' => getVcShared('colors'), 'std' => 'grey', 'dependency' => array('element' => 'style', 'value' => array('vc_box_border', 'vc_box_border_circle', 'vc_box_outline', 'vc_box_outline_circle', 'vc_box_border_circle_2', 'vc_box_outline_circle_2')), 'description' => __('Border color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Border color', 'js_composer'), 'param_name' => 'external_border_color', 'value' => getVcShared('colors'), 'std' => 'grey', 'dependency' => array('element' => 'external_style', 'value' => array('vc_box_border', 'vc_box_border_circle', 'vc_box_outline', 'vc_box_outline_circle')), 'description' => __('Border color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('On click action', 'js_composer'), 'param_name' => 'onclick', 'value' => array(__('None', 'js_composer') => '', __('Link to large image', 'js_composer') => 'img_link_large', __('Open prettyPhoto', 'js_composer') => 'link_image', __('Open custom link', 'js_composer') => 'custom_link', __('Zoom', 'js_composer') => 'zoom'), 'description' => __('Select action for click action.', 'js_composer'), 'std' => ''), array('type' => 'href', 'heading' => __('Image link', 'js_composer'), 'param_name' => 'link', 'description' => __('Enter URL if you want this image to have a link (Note: parameters like "mailto:" are also accepted).', 'js_composer'), 'dependency' => array('element' => 'onclick', 'value' => 'custom_link')), array('type' => 'dropdown', 'heading' => __('Link Target', 'js_composer'), 'param_name' => 'img_link_target', 'value' => vc_target_param_list(), 'dependency' => array('element' => 'onclick', 'value' => array('custom_link', 'img_link_large'))), vc_map_add_css_animation(), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer')), array('type' => 'hidden', 'param_name' => 'img_link_large')));
示例#20
0
                    unset($h2_custom_heading[$key]['settings']['fields']['text_align']);
                }
            }
        }
    }
}
$h4_custom_heading = vc_map_integrate_shortcode(vc_custom_heading_element_params(), 'h4_', __('Subheading', 'js_composer'), array('exclude' => array('source', 'text', 'css')), array('element' => 'use_custom_fonts_h4', 'value' => 'true'));
// This is needed to remove custom heading _tag and _align options.
if (is_array($h4_custom_heading) && !empty($h4_custom_heading)) {
    foreach ($h4_custom_heading as $key => $param) {
        if (is_array($param) && isset($param['type']) && 'font_container' === $param['type']) {
            $h4_custom_heading[$key]['value'] = '';
            if (isset($param['settings']) && is_array($param['settings']) && isset($param['settings']['fields'])) {
                $sub_key = array_search('tag', $param['settings']['fields']);
                if (false !== $sub_key) {
                    unset($h4_custom_heading[$key]['settings']['fields'][$sub_key]);
                } elseif (isset($param['settings']['fields']['tag'])) {
                    unset($h4_custom_heading[$key]['settings']['fields']['tag']);
                }
                $sub_key = array_search('text_align', $param['settings']['fields']);
                if (false !== $sub_key) {
                    unset($h4_custom_heading[$key]['settings']['fields'][$sub_key]);
                } elseif (isset($param['settings']['fields']['text_align'])) {
                    unset($h4_custom_heading[$key]['settings']['fields']['text_align']);
                }
            }
        }
    }
}
$params = array_merge(array(array('type' => 'textfield', 'heading' => __('Heading', 'js_composer'), 'admin_label' => true, 'param_name' => 'h2', 'value' => __('Hey! I am first heading line feel free to change me', 'js_composer'), 'description' => __('Enter text for heading line.', 'js_composer'), 'edit_field_class' => 'vc_col-sm-9'), array('type' => 'checkbox', 'heading' => __('Use custom font?', 'js_composer'), 'param_name' => 'use_custom_fonts_h2', 'description' => __('Enable Google fonts.', 'js_composer'), 'edit_field_class' => 'vc_col-sm-3')), $h2_custom_heading, array(array('type' => 'textfield', 'heading' => __('Subheading', 'js_composer'), 'param_name' => 'h4', 'value' => '', 'description' => __('Enter text for subheading line.', 'js_composer'), 'edit_field_class' => 'vc_col-sm-9'), array('type' => 'checkbox', 'heading' => __('Use custom font?', 'js_composer'), 'param_name' => 'use_custom_fonts_h4', 'description' => __('Enable custom font option.', 'js_composer'), 'edit_field_class' => 'vc_col-sm-3')), $h4_custom_heading, array(array('type' => 'dropdown', 'heading' => __('Text alignment', 'js_composer'), 'param_name' => 'txt_align', 'value' => getVcShared('text align'), 'description' => __('Select text alignment in "Call to Action" block.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Shape', 'js_composer'), 'param_name' => 'shape', 'std' => 'rounded', 'value' => array(__('Square', 'js_composer') => 'square', __('Rounded', 'js_composer') => 'rounded', __('Round', 'js_composer') => 'round'), 'description' => __('Select call to action shape.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => array(__('Classic', 'js_composer') => 'classic', __('Flat', 'js_composer') => 'flat', __('Outline', 'js_composer') => 'outline', __('3d', 'js_composer') => '3d', __('Custom', 'js_composer') => 'custom'), 'std' => 'classic', 'description' => __('Select call to action display style.', 'js_composer')), array('type' => 'colorpicker', 'heading' => __('Background color', 'js_composer'), 'param_name' => 'custom_background', 'description' => __('Select custom background color.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6'), array('type' => 'colorpicker', 'heading' => __('Text color', 'js_composer'), 'param_name' => 'custom_text', 'description' => __('Select custom text color.', 'js_composer'), 'dependency' => array('element' => 'style', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6'), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => array(__('Classic', 'js_composer') => 'classic') + getVcShared('colors-dashed'), 'std' => 'classic', 'description' => __('Select color schema.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown vc_cta3-colored-dropdown', 'dependency' => array('element' => 'style', 'value_not_equal_to' => array('custom'))), array('type' => 'textarea_html', 'heading' => __('Text', 'js_composer'), 'param_name' => 'content', 'value' => __('I am promo text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Width', 'js_composer'), 'param_name' => 'el_width', 'value' => array('100%' => '', '90%' => 'xl', '80%' => 'lg', '70%' => 'md', '60%' => 'sm', '50%' => 'xs'), 'description' => __('Select call to action width (percentage).', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Add button', 'js_composer') . '?', 'description' => __('Add button for call to action.', 'js_composer'), 'param_name' => 'add_button', 'value' => array(__('No', 'js_composer') => '', __('Top', 'js_composer') => 'top', __('Bottom', 'js_composer') => 'bottom', __('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right'))), vc_map_integrate_shortcode('vc_btn', 'btn_', __('Button', 'js_composer'), array('exclude' => array('css')), array('element' => 'add_button', 'not_empty' => true)), array(array('type' => 'dropdown', 'heading' => __('Add icon?', 'js_composer'), 'description' => __('Add icon for call to action.', 'js_composer'), 'param_name' => 'add_icon', 'value' => array(__('No', 'js_composer') => '', __('Top', 'js_composer') => 'top', __('Bottom', 'js_composer') => 'bottom', __('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right')), array('type' => 'checkbox', 'param_name' => 'i_on_border', 'heading' => __('Place icon on border?', 'js_composer'), 'description' => __('Display icon on call to action element border.', 'js_composer'), 'group' => __('Icon', 'js_composer'), 'dependency' => array('element' => 'add_icon', 'not_empty' => true))), vc_map_integrate_shortcode('vc_icon', 'i_', __('Icon', 'js_composer'), array('exclude' => array('align', 'css')), array('element' => 'add_icon', 'not_empty' => true)), array(vc_map_add_css_animation(), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer'))));
return array('name' => __('Call to Action', 'js_composer'), 'base' => 'vc_cta', 'icon' => 'icon-wpb-call-to-action', 'category' => array(__('Content', 'js_composer')), 'description' => __('Catch visitors attention with CTA block', 'js_composer'), 'since' => '4.5', 'params' => $params, 'js_view' => 'VcCallToActionView3');
示例#21
0
function vc_icon_element_params()
{
    return array('name' => __('Icon', 'js_composer'), 'base' => 'vc_icon', 'icon' => 'icon-wpb-vc_icon', 'category' => __('Content', 'js_composer'), 'description' => __('Eye catching icons from libraries', 'js_composer'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'js_composer') => 'fontawesome', __('Open Iconic', 'js_composer') => 'openiconic', __('Typicons', 'js_composer') => 'typicons', __('Entypo', 'js_composer') => 'entypo', __('Linecons', 'js_composer') => 'linecons'), 'admin_label' => true, 'param_name' => 'type', 'description' => __('Select icon library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_fontawesome', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'dependency' => array('element' => 'type', 'value' => 'fontawesome'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_openiconic', 'value' => 'vc-oi vc-oi-dial', 'settings' => array('emptyIcon' => false, 'type' => 'openiconic', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'type', 'value' => 'openiconic'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_typicons', 'value' => 'typcn typcn-adjust-brightness', 'settings' => array('emptyIcon' => false, 'type' => 'typicons', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'type', 'value' => 'typicons'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_entypo', 'value' => 'entypo-icon entypo-icon-note', 'settings' => array('emptyIcon' => false, 'type' => 'entypo', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'type', 'value' => 'entypo')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_linecons', 'value' => 'vc_li vc_li-heart', 'settings' => array('emptyIcon' => false, 'type' => 'linecons', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'type', 'value' => 'linecons'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Icon color', 'js_composer'), 'param_name' => 'color', 'value' => array_merge(getVcShared('colors'), array(__('Custom color', 'js_composer') => 'custom')), 'description' => __('Select icon color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'colorpicker', 'heading' => __('Custom color', 'js_composer'), 'param_name' => 'custom_color', 'description' => __('Select custom icon color.', 'js_composer'), 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => __('Background shape', 'js_composer'), 'param_name' => 'background_style', 'value' => array(__('None', 'js_composer') => '', __('Circle', 'js_composer') => 'rounded', __('Square', 'js_composer') => 'boxed', __('Rounded', 'js_composer') => 'rounded-less', __('Outline Circle', 'js_composer') => 'rounded-outline', __('Outline Square', 'js_composer') => 'boxed-outline', __('Outline Rounded', 'js_composer') => 'rounded-less-outline'), 'description' => __('Select background shape and style for icon.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Background color', 'js_composer'), 'param_name' => 'background_color', 'value' => array_merge(getVcShared('colors'), array(__('Custom color', 'js_composer') => 'custom')), 'std' => 'grey', 'description' => __('Select background color for icon.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown', 'dependency' => array('element' => 'background_style', 'not_empty' => true)), array('type' => 'colorpicker', 'heading' => __('Custom background color', 'js_composer'), 'param_name' => 'custom_background_color', 'description' => __('Select custom icon background color.', 'js_composer'), 'dependency' => array('element' => 'background_color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => __('Size', 'js_composer'), 'param_name' => 'size', 'value' => array_merge(getVcShared('sizes'), array('Extra Large' => 'xl')), 'std' => 'md', 'description' => __('Icon size.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Icon alignment', 'js_composer'), 'param_name' => 'align', 'value' => array(__('Left', 'js_composer') => 'left', __('Right', 'js_composer') => 'right', __('Center', 'js_composer') => 'center'), 'description' => __('Select icon alignment.', 'js_composer')), array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'link', 'description' => __('Add link to icon.', 'js_composer')), vc_map_add_css_animation(), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer'))), 'js_view' => 'VcIconElementView_Backend');
}
<?php

/* Message box 2
---------------------------------------------------------- */
$pixel_icons = vc_pixel_icons();
$custom_colors = array(__('Informational', 'js_composer') => 'info', __('Warning', 'js_composer') => 'warning', __('Success', 'js_composer') => 'success', __('Error', 'js_composer') => 'danger', __('Informational Classic', 'js_composer') => 'alert-info', __('Warning Classic', 'js_composer') => 'alert-warning', __('Success Classic', 'js_composer') => 'alert-success', __('Error Classic', 'js_composer') => 'alert-danger');
return array('name' => __('Message Box', 'js_composer'), 'base' => 'vc_message', 'icon' => 'icon-wpb-information-white', 'category' => __('Content', 'js_composer'), 'description' => __('Notification box', 'js_composer'), 'params' => array(array('type' => 'params_preset', 'heading' => __('Message Box Presets', 'js_composer'), 'param_name' => 'color', 'value' => '', 'options' => array(array('label' => __('Custom', 'js_composer'), 'value' => '', 'params' => array()), array('label' => __('Informational', 'js_composer'), 'value' => 'info', 'params' => array('message_box_color' => 'info', 'icon_type' => 'fontawesome', 'icon_fontawesome' => 'fa fa-info-circle')), array('label' => __('Warning', 'js_composer'), 'value' => 'warning', 'params' => array('message_box_color' => 'warning', 'icon_type' => 'fontawesome', 'icon_fontawesome' => 'fa fa-exclamation-triangle')), array('label' => __('Success', 'js_composer'), 'value' => 'success', 'params' => array('message_box_color' => 'success', 'icon_type' => 'fontawesome', 'icon_fontawesome' => 'fa fa-check')), array('label' => __('Error', 'js_composer'), 'value' => 'danger', 'params' => array('message_box_color' => 'danger', 'icon_type' => 'fontawesome', 'icon_fontawesome' => 'fa fa-times')), array('label' => __('Informational Classic', 'js_composer'), 'value' => 'alert-info', 'params' => array('message_box_color' => 'alert-info', 'icon_type' => 'pixelicons', 'icon_pixelicons' => 'vc_pixel_icon vc_pixel_icon-info')), array('label' => __('Warning Classic', 'js_composer'), 'value' => 'alert-warning', 'params' => array('message_box_color' => 'alert-warning', 'icon_type' => 'pixelicons', 'icon_pixelicons' => 'vc_pixel_icon vc_pixel_icon-alert')), array('label' => __('Success Classic', 'js_composer'), 'value' => 'alert-success', 'params' => array('message_box_color' => 'alert-success', 'icon_type' => 'pixelicons', 'icon_pixelicons' => 'vc_pixel_icon vc_pixel_icon-tick')), array('label' => __('Error Classic', 'js_composer'), 'value' => 'alert-danger', 'params' => array('message_box_color' => 'alert-danger', 'icon_type' => 'pixelicons', 'icon_pixelicons' => 'vc_pixel_icon vc_pixel_icon-explanation'))), 'description' => __('Select predefined message box design or choose "Custom" for custom styling.', 'js_composer'), 'param_holder_class' => 'vc_message-type vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'message_box_style', 'value' => getVcShared('message_box_styles'), 'description' => __('Select message box design style.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Shape', 'js_composer'), 'param_name' => 'style', 'std' => 'rounded', 'value' => array(__('Square', 'js_composer') => 'square', __('Rounded', 'js_composer') => 'rounded', __('Round', 'js_composer') => 'round'), 'description' => __('Select message box shape.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'message_box_color', 'value' => $custom_colors + getVcShared('colors'), 'description' => __('Select message box color.', 'js_composer'), 'param_holder_class' => 'vc_message-type vc_colored-dropdown'), array('type' => 'dropdown', 'heading' => __('Icon library', 'js_composer'), 'value' => array(__('Font Awesome', 'js_composer') => 'fontawesome', __('Open Iconic', 'js_composer') => 'openiconic', __('Typicons', 'js_composer') => 'typicons', __('Entypo', 'js_composer') => 'entypo', __('Linecons', 'js_composer') => 'linecons', __('Pixel', 'js_composer') => 'pixelicons', __('Mono Social', 'js_composer') => 'monosocial'), 'param_name' => 'icon_type', 'description' => __('Select icon library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_fontawesome', 'value' => 'fa fa-info-circle', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_openiconic', 'settings' => array('emptyIcon' => false, 'type' => 'openiconic', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'openiconic'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_typicons', 'settings' => array('emptyIcon' => false, 'type' => 'typicons', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'typicons'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_entypo', 'settings' => array('emptyIcon' => false, 'type' => 'entypo', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'entypo')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_linecons', 'settings' => array('emptyIcon' => false, 'type' => 'linecons', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'linecons'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_pixelicons', 'settings' => array('emptyIcon' => false, 'type' => 'pixelicons', 'source' => $pixel_icons), 'dependency' => array('element' => 'icon_type', 'value' => 'pixelicons'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon_monosocial', 'value' => 'vc-mono vc-mono-fivehundredpx', 'settings' => array('emptyIcon' => false, 'type' => 'monosocial', 'iconsPerPage' => 4000), 'dependency' => array('element' => 'icon_type', 'value' => 'monosocial'), 'description' => __('Select icon from library.', 'js_composer')), array('type' => 'textarea_html', 'holder' => 'div', 'class' => 'messagebox_text', 'heading' => __('Message text', 'js_composer'), 'param_name' => 'content', 'value' => __('<p>I am message box. Click edit button to change this text.</p>', 'js_composer')), vc_map_add_css_animation(false), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('CSS box', 'js_composer'), 'param_name' => 'css', 'group' => __('Design Options', 'js_composer'))), 'js_view' => 'VcMessageView_Backend');
示例#23
0
                    printf('<div class="blog-post-wrap col-lg-%1$s col-md-%1$s col-sm-%2$s col-xs-%2$s">', $article_columns, $article_columns_tab);
                }
                if ($layout['type'] == 'zigzag') {
                    $format = $i % 2 ? '' : 'even';
                }
                get_template_part('templates/blog/' . $layout['type'] . '/content', $format);
                if ($layout['type'] == 'grid' || $layout['type'] == 'masonry') {
                    echo '</div>';
                }
                $i++;
            }
            if ($layout['type'] == 'grid' || $layout['type'] == 'masonry') {
                echo "</div><!-- .row -->";
            }
            echo "</div><!-- .blog-posts -->";
            /**
             * @hooked cruxstore_paging_nav
             */
            do_action('cruxstore_loop_after', $layout);
        }
        wp_reset_query();
        remove_filter('excerpt_length', $exl_function, 999);
        $output .= ob_get_clean();
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'blog-posts-wrapper ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
    }
}
// Add your Visual Composer logic here
vc_map(array("name" => esc_html__("KT: Blog Posts", 'cruxstore'), "base" => "list_blog_posts", "category" => esc_html__('by Kite-Themes', 'cruxstore'), "description" => esc_html__("Display blog posts", 'cruxstore'), "params" => array(array("type" => "cruxstore_heading", "heading" => esc_html__("Layout setting", 'cruxstore'), "param_name" => "layout_settings"), array('type' => 'dropdown', 'heading' => esc_html__('Loop Style', 'cruxstore'), 'param_name' => 'blog_type', 'value' => array(esc_html__('Standard', 'js_composer') => 'classic', esc_html__('Grid', 'js_composer') => 'grid', esc_html__('Masonry', 'js_composer') => 'masonry', esc_html__('Widget', 'js_composer') => 'widget', esc_html__('Medium', 'js_composer') => 'medium'), 'std' => 'grid', 'description' => '', 'admin_label' => true), array('type' => 'textfield', 'heading' => esc_html__('Excerpt length', 'js_composer'), 'value' => 20, 'param_name' => 'excerpt_length', 'dependency' => array('element' => 'blog_type', 'value' => array('grid', 'masonry'))), array("type" => "cruxstore_heading", "heading" => esc_html__("Columns to Show?", 'cruxstore'), "edit_field_class" => "cruxstore_sub_heading vc_column", "param_name" => "items_show", 'dependency' => array('element' => 'blog_type', 'value' => array('grid', 'masonry'))), array('type' => 'dropdown', 'heading' => esc_html__('on Desktop', 'cruxstore'), 'param_name' => 'blog_columns', 'value' => array(esc_html__('2 columns', 'js_composer') => '2', esc_html__('3 columns', 'js_composer') => '3', esc_html__('4 columns', 'js_composer') => '4'), 'std' => '3', 'dependency' => array('element' => 'blog_type', 'value' => array('grid', 'masonry'))), array('type' => 'dropdown', 'heading' => esc_html__('on Tablet', 'cruxstore'), 'param_name' => 'blog_columns_tab', 'value' => array(esc_html__('2 columns', 'js_composer') => '2', esc_html__('3 columns', 'js_composer') => '3', esc_html__('4 columns', 'js_composer') => '4'), 'std' => '2', 'dependency' => array('element' => 'blog_type', 'value' => array('grid', 'masonry'))), array("type" => "cruxstore_heading", "heading" => esc_html__("Extra setting", 'cruxstore'), "param_name" => "extra_settings"), array('type' => 'dropdown', 'heading' => esc_html__('Readmore button', 'cruxstore'), 'param_name' => 'readmore', 'value' => array(esc_html__('None', 'cruxstore') => '', esc_html__('Link', 'cruxstore') => 'link'), "description" => esc_html__("Show or hide the readmore button.", 'cruxstore'), 'dependency' => array('element' => 'blog_type', 'value_not_equal_to' => array('classic', 'widget'))), array('type' => 'dropdown', 'heading' => esc_html__('Navigation type', 'js_composer'), 'param_name' => 'blog_pagination', 'admin_label' => true, 'value' => array(esc_html__('None', 'cruxstore') => 'none', esc_html__('Classic pagination', 'cruxstore') => 'classic', esc_html__('Load More button', 'cruxstore') => 'loadmore', esc_html__('Normal pagination', 'cruxstore') => 'normal'), 'description' => esc_html__('Select the navigation type', 'js_composer'), 'dependency' => array('element' => 'blog_type', 'value_not_equal_to' => array('widget'))), vc_map_add_css_animation(), array("type" => "textfield", "heading" => esc_html__("Extra class name", "js_composer"), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")), array("type" => "dropdown", "heading" => esc_html__("Data source", 'cruxstore'), "param_name" => "source", "value" => array(esc_html__('All', 'cruxstore') => '', esc_html__('Specific Categories', 'cruxstore') => 'categories', esc_html__('Specific Posts', 'cruxstore') => 'posts', esc_html__('Specific Authors', 'cruxstore') => 'authors'), "admin_label" => true, 'std' => '', "description" => esc_html__("Select content type for your posts.", 'cruxstore'), 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_taxonomy", 'taxonomy' => 'category', 'heading' => esc_html__('Categories', 'cruxstore'), 'param_name' => 'categories', 'placeholder' => esc_html__('Select your categories', 'cruxstore'), "dependency" => array("element" => "source", "value" => array('categories')), 'multiple' => true, 'select' => 'id', 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_posts", 'args' => array('post_type' => 'post', 'posts_per_page' => -1), 'heading' => esc_html__('Specific Posts', 'js_composer'), 'param_name' => 'posts', 'size' => '5', 'placeholder' => esc_html__('Select your posts', 'js_composer'), "dependency" => array("element" => "source", "value" => array('posts')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array("type" => "cruxstore_authors", 'post_type' => 'post', 'heading' => esc_html__('Specific Authors', 'js_composer'), 'param_name' => 'authors', 'size' => '5', 'placeholder' => esc_html__('Select your authors', 'js_composer'), "dependency" => array("element" => "source", "value" => array('authors')), 'multiple' => true, 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'textfield', 'heading' => esc_html__('Total items', 'js_composer'), 'param_name' => 'max_items', 'value' => 10, 'param_holder_class' => 'vc_not-for-custom', 'description' => esc_html__('Set max limit for items in grid or enter -1 to display all (limited to 1000).', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer')), array('type' => 'dropdown', 'heading' => esc_html__('Order by', 'js_composer'), 'param_name' => 'orderby', 'value' => array(esc_html__('Date', 'js_composer') => 'date', esc_html__('Order by post ID', 'js_composer') => 'ID', esc_html__('Author', 'js_composer') => 'author', esc_html__('Title', 'js_composer') => 'title', esc_html__('Last modified date', 'js_composer') => 'modified', esc_html__('Post/page parent ID', 'js_composer') => 'parent', esc_html__('Number of comments', 'js_composer') => 'comment_count', esc_html__('Menu order/Page Order', 'js_composer') => 'menu_order', esc_html__('Meta value', 'js_composer') => 'meta_value', esc_html__('Meta value number', 'js_composer') => 'meta_value_num', esc_html__('Random order', 'js_composer') => 'rand'), 'description' => esc_html__('Select order type. If "Meta value" or "Meta value Number" is chosen then meta key is required.', 'js_composer'), 'group' => esc_html__('Data settings', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', "admin_label" => true), array('type' => 'textfield', 'heading' => esc_html__('Meta key', 'js_composer'), 'param_name' => 'meta_key', 'group' => esc_html__('Data settings', 'js_composer'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'dependency' => array('element' => 'orderby', 'value' => array('meta_value', 'meta_value_num')), "admin_label" => true), array('type' => 'dropdown', 'heading' => esc_html__('Sorting', 'js_composer'), 'param_name' => 'order', 'group' => esc_html__('Data settings', 'js_composer'), 'value' => array(esc_html__('Descending', 'js_composer') => 'DESC', esc_html__('Ascending', 'js_composer') => 'ASC'), 'param_holder_class' => 'vc_grid-data-type-not-ids', 'description' => esc_html__('Select sorting order.', 'js_composer'), "admin_label" => true), array('type' => 'css_editor', 'heading' => esc_html__('Css', 'js_composer'), 'param_name' => 'css', 'group' => esc_html__('Design options', 'js_composer')))));