/** * Options form */ function form($instance) { //Helper variables $instance = wp_parse_args($instance, array('class' => '', 'count' => 4, 'order' => 'new', 'post_type' => 'post', 'taxonomy' => '', 'title' => '')); //Output ?> <p class="wm-desc"><?php _ex('Displays list of Posts or Projects.', 'Widget description.', 'webman-amplifier'); ?> </p> <p> <label for="<?php echo $this->get_field_id('title'); ?> "><?php _e('Title:', 'webman-amplifier'); ?> </label><br /> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " type="text" value="<?php echo esc_attr($instance['title']); ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('post_type'); ?> "><?php _e('Post type:', 'webman-amplifier'); ?> </label><br /> <select class="widefat" name="<?php echo $this->get_field_name('post_type'); ?> " id="<?php echo $this->get_field_id('post_type'); ?> "> <?php $options = apply_filters('wmhook_widgets_' . 'wm_posts_widget' . '_form' . '_post_type', array('post' => __('Posts', 'webman-amplifier'))); foreach ($options as $value => $name) { echo '<option value="' . $value . '" ' . selected(esc_attr($instance['post_type']), $value, false) . '>' . $name . '</option>'; } ?> </select> </p> <p> <label for="<?php echo $this->get_field_id('count'); ?> "><?php _e('Posts count:', 'webman-amplifier'); ?> </label><br /> <input class="text-center" type="number" id="<?php echo $this->get_field_id('count'); ?> " name="<?php echo $this->get_field_name('count'); ?> " value="<?php echo absint($instance['count']); ?> " size="5" maxlength="2" /> </p> <p> <label for="<?php echo $this->get_field_id('order'); ?> "><?php _e('Ordering:', 'webman-amplifier'); ?> </label><br /> <select class="widefat" name="<?php echo $this->get_field_name('order'); ?> " id="<?php echo $this->get_field_id('order'); ?> "> <?php $options = apply_filters('wmhook_widgets_' . 'wm_posts_widget' . '_form' . '_order', array('new' => _x('Newest first', 'List order method.', 'webman-amplifier'), 'old' => _x('Oldest first', 'List order method.', 'webman-amplifier'), 'name' => _x('Alphabetically', 'List order method.', 'webman-amplifier'), 'random' => _x('Randomly', 'List order method.', 'webman-amplifier'))); foreach ($options as $value => $name) { echo '<option value="' . $value . '" ' . selected(esc_attr($instance['order']), $value, false) . '>' . $name . '</option>'; } ?> </select> </p> <p> <label for="<?php echo $this->get_field_id('taxonomy'); ?> "><?php _e('Optional posts taxonomy:', 'webman-amplifier'); ?> </label><br /> <select class="widefat" name="<?php echo $this->get_field_name('taxonomy'); ?> " id="<?php echo $this->get_field_id('taxonomy'); ?> "> <?php if (function_exists('wma_taxonomy_array')) { $taxonomy_args = apply_filters('wmhook_widgets_' . 'wm_posts_widget' . '_form' . '_taxonomy', array('post' => array('optgroup' => __('Posts tags', 'webman-amplifier'), 'all' => false, 'hierarchical' => '0', 'tax_name' => 'post_tag'))); //All option echo '<option value="" ' . selected(esc_attr($instance['taxonomy']), '', false) . '>' . __('- All posts/projects -', 'webman-amplifier') . '</option>'; //Post tags foreach ($taxonomy_args as $taxonomy => $tax_args) { echo '<optgroup label="' . $tax_args['optgroup'] . '">'; $options = wma_taxonomy_array($tax_args); foreach ($options as $value => $name) { echo '<option value="' . $tax_args['tax_name'] . ':' . $value . '" ' . selected(esc_attr($instance['taxonomy']), $tax_args['tax_name'] . ':' . $value, false) . '>' . $name . '</option>'; } echo '</optgroup>'; } } ?> </select> </p> <p> <label for="<?php echo $this->get_field_id('class'); ?> "><?php _e('Optional CSS class:', 'webman-amplifier'); ?> </label><br /> <input class="widefat" id="<?php echo $this->get_field_id('class'); ?> " name="<?php echo $this->get_field_name('class'); ?> " type="text" value="<?php echo esc_attr($instance['class']); ?> " /> </p> <?php do_action('wmhook_widgets_' . 'wm_posts_widget' . '_form', $instance); }
/** * Additional Visual Composer parameters */ function wm_modify_shortcodes_definitions($definitions) { //Preparing output //Posts shortcode $definitions['posts']['vc_plugin']['params'][30]['value'] = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9); $definitions['posts']['vc_plugin']['params'][145] = array('heading' => __('Output layout', 'wm_domain'), 'description' => __('Set optional output layout name. You can use <code>simple</code> with <em>Posts</em> and <em>Projects</em> posts.', 'wm_domain'), 'type' => 'textfield', 'param_name' => 'layout', 'value' => '', 'holder' => 'hidden', 'class' => '', 'group' => __('Layout', 'wm_domain')); //Row shortcode $definitions['vc_row']['vc_plugin']['params'][5] = array('heading' => __('Remove section inner container', 'wm_domain'), 'description' => __('This is only relevant when using "Fullwidth sections" page layout.', 'wm_domain'), 'type' => 'checkbox', 'param_name' => 'disable_container', 'value' => '', 'value' => array(__('Remove the inner Section container to make the content fill the whole section without any paddings.', 'wm_domain') => 1), 'holder' => 'hidden', 'class' => ''); $definitions['vc_row']['vc_plugin']['params'][90] = array('heading' => __('Section background video URL', 'wm_domain'), 'description' => __('Set optional section background video URL. Video will be played automatically in a loop.', 'wm_domain'), 'type' => 'textfield', 'param_name' => 'video_url', 'value' => '', 'holder' => 'hidden', 'class' => '', 'group' => __('Styling', 'wm_domain')); //Column shortcode $definitions['vc_column']['vc_plugin']['params'][5] = array('heading' => __('Background image', 'wm_domain'), 'description' => __('The image will cover the column background', 'wm_domain'), 'type' => 'attach_image', 'param_name' => 'bg_image', 'value' => '', 'holder' => 'hidden', 'class' => ''); //Slideshow shortcode $definitions['slideshow']['vc_plugin']['params'][20]['value'] = array(__('Just Next/Prev button', 'wm_domain') => '', __('Next/Prev + Pagination', 'wm_domain') => 'pagination'); //bbPress shortcodes if (class_exists('bbPress')) { //Forum index $definitions['bbp-forum-index'] = array('vc_plugin' => array('name' => __('Forums Index', 'wm_domain'), 'base' => 'bbp-forum-index', 'class' => 'wm-shortcode-vc-bbp-forum-index', 'category' => __('Forum', 'wm_domain'), 'show_settings_on_create' => false, 'params' => array(10 => array('heading' => '<a href="http://codex.bbpress.org/shortcodes/" target="_blank"><strong>' . __('bbPress Shortcode', 'wm_domain') . '</strong></a>', 'description' => __('This will display your entire forum index. No parameters to be set.', 'wm_domain'), 'type' => 'wm_html', 'param_name' => 'forums', 'value' => '', 'holder' => 'hidden', 'class' => '')))); } //WooCommerce shortcodes if (class_exists('Woocommerce')) { //Product categories $definitions['product_categories'] = array('vc_plugin' => array('name' => __('Product Categories', 'wm_domain'), 'base' => 'product_categories', 'class' => 'wm-shortcode-vc-product_categories', 'category' => __('Shop', 'wm_domain'), 'show_settings_on_create' => false, 'params' => array(10 => array('heading' => __('Count', 'wm_domain'), 'description' => '', 'type' => 'textfield', 'param_name' => 'number', 'value' => '', 'holder' => 'hidden', 'class' => ''), 20 => array('heading' => __('Columns', 'wm_domain'), 'description' => '', 'type' => 'dropdown', 'param_name' => 'columns', 'value' => array(3 => 3, 4 => 4, 5 => 5), 'holder' => 'hidden', 'class' => '')))); //Single product category $definitions['product_category'] = array('vc_plugin' => array('name' => __('Product Category', 'wm_domain'), 'base' => 'product_category', 'class' => 'wm-shortcode-vc-product_category', 'category' => __('Shop', 'wm_domain'), 'show_settings_on_create' => true, 'params' => array(10 => array('heading' => __('Category', 'wm_domain'), 'description' => '', 'type' => 'dropdown', 'param_name' => 'category', 'value' => array_flip(wma_taxonomy_array(array('all_post_type' => 'product', 'all_text' => '', 'hierarchical' => '0', 'tax_name' => 'product_cat'))), 'holder' => 'hidden', 'class' => ''), 20 => array('heading' => __('Number of products per page', 'wm_domain'), 'description' => '', 'type' => 'textfield', 'param_name' => 'per_page', 'value' => '', 'holder' => 'hidden', 'class' => ''), 30 => array('heading' => __('Columns', 'wm_domain'), 'description' => '', 'type' => 'dropdown', 'param_name' => 'columns', 'value' => array(3 => 3, 4 => 4, 5 => 5), 'holder' => 'hidden', 'class' => '')))); //Recent products $definitions['recent_products'] = array('vc_plugin' => array('name' => __('Recent Products', 'wm_domain'), 'base' => 'recent_products', 'class' => 'wm-shortcode-vc-recent_products', 'category' => __('Shop', 'wm_domain'), 'show_settings_on_create' => true, 'params' => array(10 => array('heading' => __('Number of products per page', 'wm_domain'), 'description' => '', 'type' => 'textfield', 'param_name' => 'per_page', 'value' => '', 'holder' => 'hidden', 'class' => ''), 20 => array('heading' => __('Columns', 'wm_domain'), 'description' => '', 'type' => 'dropdown', 'param_name' => 'columns', 'value' => array(3 => 3, 4 => 4, 5 => 5), 'holder' => 'hidden', 'class' => '')))); //Featured products $definitions['featured_products'] = array('vc_plugin' => array('name' => __('Featured Products', 'wm_domain'), 'base' => 'featured_products', 'class' => 'wm-shortcode-vc-featured_products', 'category' => __('Shop', 'wm_domain'), 'show_settings_on_create' => true, 'params' => array(10 => array('heading' => __('Number of products per page', 'wm_domain'), 'description' => '', 'type' => 'textfield', 'param_name' => 'per_page', 'value' => '', 'holder' => 'hidden', 'class' => ''), 20 => array('heading' => __('Columns', 'wm_domain'), 'description' => '', 'type' => 'dropdown', 'param_name' => 'columns', 'value' => array(3 => 3, 4 => 4, 5 => 5), 'holder' => 'hidden', 'class' => '')))); } //Output return $definitions; }
/** * Page metabox metafields * * @version 1.6 * * @param array $fields Array of predefined metafields * * @return array Modified $fields array */ function wm_page_metafields($fields = array()) { //Helper variables global $post_id; $wm_layouts = !function_exists('wm_helper_var') ? array('sidebars' => array(), 'website' => array()) : wm_helper_var('layouts'); $menus = get_terms('nav_menu', array('hide_empty' => true)); $helper = array('menus' => array('' => __('Default', 'mustang')), 'sidebars' => $wm_layouts['sidebars'], 'website' => $wm_layouts['website']); if (is_array($menus) && !empty($menus)) { foreach ($menus as $item) { if (isset($item->name) && isset($item->slug)) { $helper['menus'][$item->slug] = $item->name; } } } //"Settings" tab $fields[100] = array('type' => 'section-open', 'id' => 'page-options-section', 'title' => __('Settings', 'mustang'), 'page' => array('templates' => array('page-template/blank.php'), 'operand' => 'IS_NOT')); $fields[120] = array('type' => 'checkbox', 'id' => 'disable-heading', 'label' => __('Disable main heading', 'mustang'), 'description' => __('Hide main heading section', 'mustang')); $fields[140] = array('type' => 'select', 'id' => 'sidebar', 'label' => esc_html__('Page layout', 'mustang'), 'description' => esc_html__('Select a sidebar position or enable fullwidth sections.', 'mustang') . '<br>' . esc_html__('Fullwidth sections page layout is suitable for use with page builders.', 'mustang'), 'options' => $helper['sidebars']); $fields[160] = array('type' => 'select', 'id' => 'layout', 'label' => __('Website layout', 'mustang'), 'description' => __('Select a website layout for this page', 'mustang'), 'options' => $helper['website']); $fields[180] = array('type' => 'select', 'id' => 'footer', 'label' => __('Footer layout', 'mustang'), 'description' => __('Select a footer layout', 'mustang'), 'options' => array('' => __('Widgets and credits', 'mustang'), 'widgets' => __('Widgets only', 'mustang'), 'credits' => __('Credits only', 'mustang'), 'none' => __('No footer', 'mustang'))); $fields[1000] = array('type' => 'section-close'); // /"Settings" tab //"Slider" tab $fields[2000] = array('type' => 'section-open', 'id' => 'page-slider-section', 'title' => __('Slider', 'mustang'), 'page' => array('templates' => array('page-template/blank.php'), 'operand' => 'IS_NOT')); $fields[2020] = array('type' => 'html', 'content' => '<tr class="option padding-20"><td colspan="2"><div class="box blue">' . __('<strong>Please note that this is a special slider section setup.</strong><br />This slider will be displayed above the website header area. For standard sliders please use the shortcodes directly in the page content.', 'mustang') . '</div></td></tr>'); $fields[2040] = array('type' => 'select', 'id' => 'slider', 'label' => __('Set special slider', 'mustang'), 'description' => __('Select a slider type used as a special slider above the website header', 'mustang'), 'options' => array('' => __('No special slider', 'mustang'), 'custom' => __('Custom slider (use shortcode)', 'mustang'), 'static' => __('Featured image', 'mustang'))); $fields[2060] = array('type' => 'text', 'id' => 'slider-shortcode', 'label' => __('Slider shortcode', 'mustang'), 'description' => __('Set the custom slider shortcode', 'mustang'), 'conditional' => array('option' => array('tag' => 'select', 'name' => 'wm-slider', 'type' => ''), 'option_value' => array('custom'), 'operand' => 'IS')); $fields[2080] = array('type' => 'select', 'id' => 'slider-static', 'label' => __('Image caption position', 'mustang'), 'description' => __('Featured image will be displayed in the special slider section.<br />Set the image caption (you can use shortcodes) and set the image caption position here.', 'mustang') . '<br /><a href="#" class="button-primary button-set-featured-image" style="margin-top: .5em">' . __('Set featured image', 'mustang') . '</a>', 'options' => array('center' => __('Center', 'mustang'), 'left' => __('Left', 'mustang'), 'right' => __('Right', 'mustang')), 'conditional' => array('option' => array('tag' => 'select', 'name' => 'wm-slider', 'type' => ''), 'option_value' => array('static'), 'operand' => 'IS')); $fields[3000] = array('type' => 'section-close'); // /"Slider" tab //"Blog" tab $fields[4000] = array('type' => 'section-open', 'id' => 'page-blog-section', 'title' => __('Blog', 'mustang'), 'page' => array('templates' => array('home.php'), 'operand' => 'IS')); $fields[4020] = array('type' => 'slider', 'id' => 'blog-posts-count', 'label' => __('Number of posts', 'mustang'), 'description' => __('Sets the number of posts listed on this blog page only. Other archives will display posts according to WordPress settings.<br />Value of "-1" will display all posts. When you set the value of "0", WordPress settings are applied.', 'mustang'), 'default' => 0, 'min' => -1, 'max' => 25, 'step' => 1, 'zero' => true); //Categories multi field $category_fields = array(); $category_fields[] = array('type' => 'select', 'id' => 'category', 'label' => __('Category', 'mustang'), 'options' => wma_taxonomy_array()); $fields[4040] = array('type' => 'repeater', 'id' => 'blog-categories', 'label' => __('Posts categories', 'mustang'), 'description' => __('You can choose to display all posts or posts from a specific categories only. Press [+] button to add a category and select the category name from dropdown list.', 'mustang'), 'fields' => $category_fields); $fields[4060] = array('type' => 'radio', 'id' => 'blog-categories-action', 'label' => __('Categories action', 'mustang'), 'description' => __('Exclude or use the above categories?', 'mustang'), 'default' => 'category__in', 'options' => array('category__in' => __('Posts just from these categories', 'mustang'), 'category__not_in' => __('Exclude posts from these categories', 'mustang'))); $fields[5000] = array('type' => 'section-close'); // /"Blog" tab //"One page" tab if (!class_exists('WooCommerce') || !(class_exists('WooCommerce') && $post_id && $post_id == wc_get_page_id('shop'))) { $fields[6000] = array('type' => 'section-open', 'id' => 'page-one-section', 'title' => __('One page', 'mustang'), 'page' => array('templates' => array('page-template/one-page.php'), 'operand' => 'IS')); $fields[6020] = array('type' => 'html', 'content' => '<tr class="option padding-20"><td colspan="2"><div class="box blue">' . __('Use this page template to place most (or all) of your website content on a single page. Set the ID for each section of the page (apply on row shortcode) and use them in custom navigation as anchors. You can set a navigation for this page below. Once you click the navigation link, the page will scroll to the section of a specific anchor ID.', 'mustang') . '</div></td></tr>'); $fields[6040] = array('type' => 'select', 'id' => 'navigation', 'label' => __('Anchor navigation', 'mustang'), 'description' => __('Set a special anchor navigation for this page', 'mustang'), 'options' => $helper['menus']); $fields[7000] = array('type' => 'section-close'); } // /"One page" tab /** * For more form fields options please check the PHP files inside * the "wm-amplifier/includes/metabox/fields/" folder. */ return $fields; }
$heading_tags = array('' => esc_html_x('Default', 'Default heading tag value.', 'webman-amplifier'), 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6'); // Social icons array $wm_social_icons_array = self::$codes_globals['social_icons']; array_push($wm_social_icons_array, '', 'background-light', 'background-dark'); asort($wm_social_icons_array); $wm_social_icons_array = array_combine($wm_social_icons_array, $wm_social_icons_array); // Taxonomies $wm_taxonomies = get_taxonomies('', 'names'); unset($wm_taxonomies['nav_menu']); unset($wm_taxonomies['link_category']); asort($wm_taxonomies); // Slugs $wm_modules_slugs = wma_posts_array('post_name', 'wm_modules'); $wm_modules_tags = wma_taxonomy_array(array('all_post_type' => '', 'all_text' => '-', 'hierarchical' => '0', 'tax_name' => 'module_tag')); $wm_testimonials_slugs = wma_posts_array('post_name', 'wm_testimonials'); $wm_testimonials_categories = wma_taxonomy_array(array('all_post_type' => '', 'all_text' => '-', 'hierarchical' => '0', 'tax_name' => 'testimonial_category')); $shortcode_definitions = array('accordion' => array('since' => '1.0', 'preprocess' => false, 'generator' => array('name' => __('Accordion', 'webman-amplifier'), 'code' => '[PREFIX_accordion active="0" mode="accordion/toggle" filter="0/1" class=""]<br />[PREFIX_item title="' . __('Section 1', 'webman-amplifier') . '" tags="" icon="" heading_tag=""]{{content}}[/PREFIX_item]<br />[PREFIX_item title="' . __('Section 2', 'webman-amplifier') . '" tags="" icon="" heading_tag=""][/PREFIX_item]<br />[/PREFIX_accordion]', 'short' => false), 'bb_plugin' => array('name' => __('Accordion', 'webman-amplifier'), 'output' => '[PREFIX_accordion{{active}}{{mode}}{{filter}}{{class}}]{{children}}[/PREFIX_accordion]', 'output_children' => '[PREFIX_item{{title}}{{icon}}{{tags}}{{heading_tag}}]{{content}}[/PREFIX_item]', 'params' => array('active', 'mode', 'filter', 'class'), 'params_children' => array('title', 'content', 'icon', 'tags', 'heading_tag'), 'form' => array('general' => array('title' => __('General', 'webman-amplifier'), 'description' => '', 'sections' => array('general' => array('title' => '', 'fields' => array('mode' => array('type' => 'select', 'label' => __('Mode', 'webman-amplifier'), 'options' => array('accordion' => __('Accordion (only one section open)', 'webman-amplifier'), 'toggle' => __('Toggle (multiple sections open)', 'webman-amplifier')), 'preview' => array('type' => 'none')))), 'sections' => array('title' => __('Sections', 'webman-amplifier'), 'fields' => array('children' => array('type' => 'form', 'label' => '', 'description' => '', 'help' => '', 'default' => array('title' => __('Section', 'webman-amplifier')), 'form' => 'wm_children_form_' . 'accordion', 'preview_text' => 'title', 'multiple' => true, 'preview' => array('type' => 'refresh')))))), 'others' => array('title' => __('Others', 'webman-amplifier'), 'description' => '', 'sections' => array('general' => array('title' => '', 'fields' => array('filter' => array('type' => 'select', 'label' => __('Filtering', 'webman-amplifier'), 'help' => __('Display the sections filter from sections tags?', 'webman-amplifier'), 'options' => array('' => __('No', 'webman-amplifier'), 1 => __('Yes', 'webman-amplifier')), 'preview' => array('type' => 'none')), 'active' => array('type' => 'select', 'label' => __('Active section number', 'webman-amplifier'), 'default' => 1, 'options' => array('0' => esc_attr__('All accordion sections closed', 'webman-amplifier'), 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10), 'preview' => array('type' => 'none'))))))), 'form_children' => array('title' => __('Section', 'webman-amplifier'), 'tabs' => array('general' => array('title' => __('General', 'webman-amplifier'), 'description' => '', 'sections' => array('title' => array('title' => '', 'fields' => array('title' => array('type' => 'text', 'label' => __('Title', 'webman-amplifier'), 'default' => __('Section', 'webman-amplifier'), 'preview' => array('type' => 'none')))), 'content' => array('title' => __('Content', 'webman-amplifier'), 'fields' => array('content' => array('type' => 'editor', 'label' => '', 'preview' => array('type' => 'none')))))), 'others' => array('title' => __('Others', 'webman-amplifier'), 'description' => '', 'sections' => array('icon' => array('title' => __('Icon', 'webman-amplifier'), 'fields' => array('icon' => array('type' => 'wm_radio', 'label' => '', 'options' => self::$codes_globals['font_icons'], 'custom' => '<i class="{{value}}" title="{{value}}" style="display: inline-block; width: 20px; height: 20px; line-height: 1em; font-size: 20px; vertical-align: top; color: #444;"></i>', 'filter' => true, 'hide_radio' => true, 'inline' => true, 'preview' => array('type' => 'none')))), 'other' => array('title' => __('Other parameters', 'webman-amplifier'), 'fields' => array('tags' => array('type' => 'text', 'label' => __('Tags', 'webman-amplifier'), 'help' => __('Enter comma separated tags. These will be used to filter through items.', 'webman-amplifier'), 'preview' => array('type' => 'none')), 'heading_tag' => array('type' => 'select', 'label' => __('Heading HTML tag', 'webman-amplifier'), 'description' => sprintf(esc_html__('Default value: %s', 'webman-amplifier'), 'H3'), 'options' => $heading_tags, 'preview' => array('type' => 'none'))))))))), 'vc_plugin' => array('name' => $this->prefix_shortcode_name . __('Accordion', 'webman-amplifier'), 'base' => $this->prefix_shortcode . 'accordion', 'class' => 'wm-shortcode-vc-accordion wm-sections-mode', 'icon' => 'icon-wpb-ui-accordion', 'show_settings_on_create' => false, 'is_container' => true, 'category' => __('Content', 'webman-amplifier'), 'custom_markup' => ' <h4 class="wm-sections-mode-title wpb_element_title"><i class="vc_general vc_element-icon icon-wpb-ui-separator-label"></i> ' . __('Accordion', 'webman-amplifier') . '</h4> <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children"> %content% </div> <div class="tab_controls"> <button data-item="' . $this->prefix_shortcode . 'item" data-item-title="' . __('Section', 'webman-amplifier') . '" class="add_tab" title="' . __('Accordion: Add new section', 'webman-amplifier') . '">' . __('Accordion: Add new section', 'webman-amplifier') . '</button> </div> ', 'default_content' => ' [' . $this->prefix_shortcode . 'item title="' . __('Section 1', 'webman-amplifier') . '"][/' . $this->prefix_shortcode . 'item] [' . $this->prefix_shortcode . 'item title="' . __('Section 2', 'webman-amplifier') . '"][/' . $this->prefix_shortcode . 'item] ', 'js_view' => 'VcCustomAccordionView', 'params' => array(10 => array('heading' => __('Active section', 'webman-amplifier'), 'description' => __('Set section order number, "0" for all sections closed', 'webman-amplifier'), 'type' => 'textfield', 'param_name' => 'active', 'value' => 0, 'holder' => 'hidden', 'class' => ''), 20 => array('heading' => __('Mode', 'webman-amplifier'), 'type' => 'dropdown', 'param_name' => 'mode', 'value' => array(__('Accordion (only one section open)', 'webman-amplifier') => 'accordion', __('Toggle (multiple sections open)', 'webman-amplifier') => 'toggle'), 'holder' => 'hidden', 'class' => ''), 30 => array('heading' => __('Filtering', 'webman-amplifier'), 'description' => __('Display the sections filter from sections tags?', 'webman-amplifier'), 'type' => 'dropdown', 'param_name' => 'filter', 'value' => array(__('No', 'webman-amplifier') => '', __('Yes', 'webman-amplifier') => 1), 'holder' => 'hidden', 'class' => ''), 40 => array('heading' => __('CSS class', 'webman-amplifier'), 'description' => __('Optional CSS additional classes', 'webman-amplifier'), 'type' => 'textfield', 'param_name' => 'class', 'value' => '', 'holder' => 'hidden', 'class' => '')))), 'tabs' => array('since' => '1.0', 'preprocess' => false, 'generator' => array('name' => __('Tabs', 'webman-amplifier'), 'code' => '[PREFIX_tabs active="0" layout="top/left/right" tour="0/1" class=""]<br />[PREFIX_item title="' . __('Tab 1', 'webman-amplifier') . '" tags="" icon="" heading_tag=""]{{content}}[/PREFIX_item]<br />[PREFIX_item title="' . __('Tab 2', 'webman-amplifier') . '" tags="" icon="" heading_tag=""][/PREFIX_item]<br />[/PREFIX_tabs]', 'short' => false), 'bb_plugin' => array('name' => __('Tabs', 'webman-amplifier'), 'output' => '[PREFIX_tabs{{layout}}{{tour}}{{active}}{{class}}]{{children}}[/PREFIX_tabs]', 'output_children' => '[PREFIX_item{{title}}{{icon}}{{tags}}{{heading_tag}}]{{content}}[/PREFIX_item]', 'params' => array('layout', 'tour', 'active', 'class'), 'params_children' => array('title', 'content', 'icon', 'tags', 'heading_tag'), 'form' => array('general' => array('title' => __('General', 'webman-amplifier'), 'description' => '', 'sections' => array('general' => array('title' => '', 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout', 'webman-amplifier'), 'options' => array('top' => __('Tabs on top', 'webman-amplifier'), 'left' => __('Tabs on left', 'webman-amplifier'), 'right' => __('Tabs on right', 'webman-amplifier')), 'preview' => array('type' => 'none')))), 'sections' => array('title' => __('Sections', 'webman-amplifier'), 'fields' => array('children' => array('type' => 'form', 'label' => '', 'description' => '', 'help' => '', 'default' => array('title' => __('Section', 'webman-amplifier')), 'form' => 'wm_children_form_' . 'tabs', 'preview_text' => 'title', 'multiple' => true, 'preview' => array('type' => 'refresh')))))), 'others' => array('title' => __('Others', 'webman-amplifier'), 'description' => '', 'sections' => array('general' => array('title' => '', 'fields' => array('tour' => array('type' => 'select', 'label' => __('Enable tour mode?', 'webman-amplifier'), 'options' => array('' => __('No', 'webman-amplifier'), 1 => __('Yes', 'webman-amplifier')), 'preview' => array('type' => 'none')), 'active' => array('type' => 'select', 'label' => __('Active tab number', 'webman-amplifier'), 'default' => 1, 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10), 'preview' => array('type' => 'none'))))))), 'form_children' => array('title' => __('Section', 'webman-amplifier'), 'tabs' => array('general' => array('title' => __('General', 'webman-amplifier'), 'description' => '', 'sections' => array('title' => array('title' => '', 'fields' => array('title' => array('type' => 'text', 'label' => __('Title', 'webman-amplifier'), 'default' => __('Section', 'webman-amplifier'), 'preview' => array('type' => 'none')))), 'content' => array('title' => __('Content', 'webman-amplifier'), 'fields' => array('content' => array('type' => 'editor', 'label' => '', 'preview' => array('type' => 'none')))))), 'others' => array('title' => __('Others', 'webman-amplifier'), 'description' => '', 'sections' => array('icon' => array('title' => __('Icon', 'webman-amplifier'), 'fields' => array('icon' => array('type' => 'wm_radio', 'label' => '', 'options' => self::$codes_globals['font_icons'], 'custom' => '<i class="{{value}}" title="{{value}}" style="display: inline-block; width: 20px; height: 20px; line-height: 1em; font-size: 20px; vertical-align: top; color: #444;"></i>', 'filter' => true, 'hide_radio' => true, 'inline' => true, 'preview' => array('type' => 'none')))), 'other' => array('title' => __('Other parameters', 'webman-amplifier'), 'fields' => array('heading_tag' => array('type' => 'select', 'label' => __('Heading HTML tag', 'webman-amplifier'), 'description' => sprintf(esc_html__('Default value: %s', 'webman-amplifier'), 'H3'), 'options' => $heading_tags, 'preview' => array('type' => 'none'))))))))), 'vc_plugin' => array('name' => $this->prefix_shortcode_name . __('Tabs', 'webman-amplifier'), 'base' => $this->prefix_shortcode . 'tabs', 'class' => 'wm-shortcode-vc-tabs wm-sections-mode', 'icon' => 'icon-wpb-ui-tab-content', 'show_settings_on_create' => false, 'is_container' => true, 'category' => __('Content', 'webman-amplifier'), 'custom_markup' => ' <h4 class="wm-sections-mode-title wpb_element_title"><i class="vc_general vc_element-icon icon-wpb-ui-tab-content"></i> ' . __('Tabs', 'webman-amplifier') . '</h4> <div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children"> %content%