Exemplo n.º 1
0
vc_remove_param("vc_tta_tabs", "gap");
vc_remove_param("vc_tta_tabs", "alignment");
vc_remove_param("vc_tta_tabs", "pagination_color");
vc_remove_param("vc_tta_tabs", "pagination_style");
// Banner shortcode
vc_map(array("name" => __("Banner", THB_THEME_NAME), "base" => "thb_banner", "icon" => "thb_vc_ico_banner", "class" => "thb_vc_sc_banner", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => "Select Background Image", "param_name" => "banner_bg", "description" => ""), array("type" => "textfield", "heading" => "Banner Height", "param_name" => "banner_height", "description" => "Enter height of the banner in px."), array("type" => "dropdown", "class" => "", "heading" => "Banner Effect", "param_name" => "type", "value" => array("Lily" => "effect-lily", "Sadie" => "effect-sadie", "Honey" => "effect-honey", "layla" => "effect-layla", "Marley" => "effect-marley", "Ruby" => "effect-ruby", "Roxy" => "effect-roxy", "Bubba" => "effect-bubba", "Romeo" => "effect-romeo", "Dexter" => "effect-dexter", "Sarah" => "effect-sarah", "Chico" => "effect-chico", "Milo" => "effect-milo"), "description" => "You can see the effects here: http://themes.fuelthemes.net/skillful/banners/"), array("type" => "textfield", "heading" => "Title", "param_name" => "title", "admin_label" => true), array("type" => "textfield", "heading" => "Sub Title", "param_name" => "subtitle"), array("type" => "textfield", "heading" => "Link", "param_name" => "overlay_link")), "description" => "Display different banner styles"));
// Button shortcode
vc_map(array("name" => __("Button", THB_THEME_NAME), "base" => "thb_button", "icon" => "thb_vc_ico_button", "class" => "thb_vc_sc_button", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => "Caption", "admin_label" => true, "param_name" => "content", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => "Link URL", "param_name" => "link", "value" => "", "description" => ""), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'description' => __('Select icon from library.', 'js_composer')), array("type" => "dropdown", "class" => "", "heading" => "Open link in", "param_name" => "target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Size", "param_name" => "size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "large"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Button color", "param_name" => "color", "value" => array("Accent Color" => "accent", "Black" => "black", "White" => "white"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => "")), "description" => "Add an animated button"));
// Divider Shortcode
vc_map(array("name" => __("Dividers", THB_THEME_NAME), "base" => "thb_dividers", "icon" => "thb_vc_ico_dividers", "class" => "thb_vc_sc_dividers", "category" => "by Fuel Themes", "show_settings_on_create" => true, "params" => array(array("type" => "dropdown", "heading" => "Style", "param_name" => "style", "admin_label" => true, "value" => array('Style 1' => "style1", 'Style 2' => "style2", 'Style 3' => "style3", 'Style 4' => "style4", 'Style 5' => "style5", 'Style 6' => "style6", 'Style 7' => "style7", 'Style 8' => "style8"), "description" => "This changes the style of the dividers")), "description" => "Divide your content with different divider styles."));
// Gap shortcode
vc_map(array("name" => __("Gap", THB_THEME_NAME), "base" => "thb_gap", "icon" => "thb_vc_ico_gap", "class" => "thb_vc_sc_gap", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => "Gap Height", "param_name" => "height", "admin_label" => true, "description" => "Enter height of the gap in px.")), "description" => "Add a gap to seperate elements"));
// Icon List shortcode
vc_map(array("name" => __("Icon List", THB_THEME_NAME), "base" => "thb_iconlist", "icon" => "thb_vc_ico_iconlist", "class" => "thb_vc_sc_iconlist", "category" => "by Fuel Themes", "params" => array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'description' => __('Select icon from library.', 'js_composer')), array("type" => "colorpicker", "class" => "", "heading" => "Icon color", "param_name" => "color", "value" => "", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "exploded_textarea", "class" => "", "heading" => "List Items", "admin_label" => true, "param_name" => "content", "value" => "", "description" => "Every new line will be treated as a list item")), "description" => "Add lists with icons"));
// Iconbox shortcode
vc_map(array("name" => __("Iconbox", THB_THEME_NAME), "base" => "thb_iconbox", "icon" => "thb_vc_ico_iconbox", "class" => "thb_vc_sc_iconbox", "category" => "by Fuel Themes", "params" => array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'description' => __('Select icon from library.', 'js_composer')), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => "Icon Color", "param_name" => "icon_color", "description" => ""), array("type" => "attach_image", "class" => "", "heading" => "Image", "param_name" => "image", "description" => "Use image instead of icon? Image uploaded should be 100*100"), array("type" => "textfield", "class" => "", "heading" => "Heading", "param_name" => "heading", "value" => "", "admin_label" => true, "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => "Heading Color", "param_name" => "heading_color", "value" => "", "description" => "You can change the heading color from here"), array("type" => "textarea", "class" => "", "heading" => "Content", "param_name" => "content", "value" => "", "description" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => "Content Color", "param_name" => "content_color", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "checkbox", "class" => "", "heading" => "Add Button?", "param_name" => "use_btn", "value" => array("" => "true"), "description" => "Check if you want to add a button."), array("type" => "textfield", "class" => "", "heading" => "Button Caption", "param_name" => "btn_content", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "textfield", "class" => "", "heading" => "Button Link URL", "param_name" => "btn_link", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Icon", "param_name" => "btn_icon", "value" => thb_getIconArray(), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Open link in", "param_name" => "btn_target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Size", "param_name" => "btn_size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "big"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Style", "param_name" => "btn_style", "value" => array("Fill" => "", "Outline" => "outline"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button color", "param_name" => "btn_color", "value" => array("Accent" => "accent", "Black" => "black", "White" => "white"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true))), "description" => "Iconboxes with different animations"));
// Image shortcode
vc_map(array("name" => "Image", "base" => "thb_image", "icon" => "thb_vc_ico_image", "class" => "thb_vc_sc_image", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => "Select Image", "param_name" => "image", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "textfield", "heading" => "Image size", "param_name" => "img_size", "description" => "Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use 'thumbnail' size."), array("type" => "dropdown", "heading" => "Image alignment", "param_name" => "alignment", "value" => array("Align left" => "left", "Align right" => "right", "Align center" => "center"), "description" => "Select image alignment."), array("type" => "checkbox", "class" => "", "heading" => "Link to Full-Width Image?", "param_name" => "lightbox", "value" => array("" => "true")), array("type" => "vc_link", "heading" => "Image link", "param_name" => "img_link", "description" => "Enter url if you want this image to have link.", "dependency" => array('element' => "lightbox", 'is_empty' => true))), "description" => "Add an animated image"));
// Image Slider
vc_map(array("name" => __("Image Slider", THB_THEME_NAME), "base" => "thb_slider", "icon" => "thb_vc_ico_slider", "class" => "thb_vc_sc_slider", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_images", "class" => "", "heading" => "Select Images", "param_name" => "images", "admin_label" => true, "description" => ""), array("type" => "textfield", "heading" => "Width", "param_name" => "width", "description" => "Enter the width of the images. The slider will fill the width of the container, so make sure you size the columns accordingly."), array("type" => "textfield", "heading" => "Height", "param_name" => "height", "description" => "Enter the height of the images."), array("type" => "checkbox", "class" => "", "heading" => "Navigation Arrows", "param_name" => "navigation", "value" => array("" => "true"), "description" => "Check this if you want to show navigation arrows.")), "description" => "Add an image slider"));
// Products
vc_map(array("name" => __("Instagram", THB_THEME_NAME), "base" => "thb_instagram", "icon" => "thb_vc_ico_instagram", "class" => "thb_vc_sc_instagram", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => "Username", "param_name" => "username", "description" => "Instagram Username"), array("type" => "textfield", "heading" => "Number of Photos", "param_name" => "number", "description" => "Number of Instagram Photos to retrieve"), array("type" => "dropdown", "heading" => "Columns", "param_name" => "columns", "value" => array('Six Columns' => "6", 'Five Columns' => "5", 'Four Columns' => "4", 'Three Columns' => "3", 'Two Columns' => "2")), array("type" => "checkbox", "heading" => "Link Photos to Instagram?", "param_name" => "link", "value" => array("" => "true"), "description" => "Do you want to link the Instagram photos to instagram.com website?")), "description" => "Add Instagram Photos"));
// Notification shortcode
vc_map(array("name" => __("Notification", THB_THEME_NAME), "base" => "thb_notification", "icon" => "thb_vc_ico_notification", "class" => "thb_vc_sc_notification", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "class" => "", "heading" => "Type", "param_name" => "type", "value" => array("Information" => "information", "Success" => "success", "Warning" => "warning", "Error" => "error"), "description" => ""), array("type" => "textarea", "class" => "", "heading" => "Content", "admin_label" => true, "param_name" => "content", "value" => "", "description" => "")), "description" => "Display Notifications"));
// Single Product
vc_map(array("name" => __("Single Product Page", THB_THEME_NAME), "base" => "thb_product_singlepage", "icon" => "thb_vc_ico_product_singlepage", "class" => "thb_vc_sc_product_singlepage", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => "Product ID", "param_name" => "product_id", "admin_label" => true, "description" => "Enter the product ID you would like to display")), "description" => "Add single product Page"));
// Single Product
vc_map(array("name" => __("Single Product", THB_THEME_NAME), "base" => "thb_product_single", "icon" => "thb_vc_ico_product_single", "class" => "thb_vc_sc_product_single", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => "Product ID", "param_name" => "product_id", "admin_label" => true, "description" => "Enter the products ID you would like to display")), "description" => "Add WooCommerce product"));
// Products
vc_map(array("name" => __("Products", THB_THEME_NAME), "base" => "thb_product", "icon" => "thb_vc_ico_product", "class" => "thb_vc_sc_product", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => "Product Sort", "param_name" => "product_sort", "value" => array('Best Sellers' => "best-sellers", 'Latest Products' => "latest-products", 'Top Rated' => "top-rated", 'Featured Products' => "featured-products", 'Sale Products' => "sale-products", 'By Category' => "by-category", 'By Product ID' => "by-id"), "description" => "Select the order of the products you'd like to show."), array("type" => "checkbox", "heading" => "Product Category", "param_name" => "cat", "value" => thb_productCategories(), "description" => "Select the order of the products you'd like to show.", "dependency" => array('element' => "product_sort", 'value' => array('by-category'))), array("type" => "textfield", "heading" => "Product IDs", "param_name" => "product_ids", "description" => "Enter the products IDs you would like to display seperated by comma", "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "dropdown", "heading" => "Carousel", "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => "Select yes to display the products in a carousel."), array("type" => "textfield", "class" => "", "heading" => "Number of Items", "param_name" => "item_count", "value" => "4", "description" => "The number of products to show.", "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'sale-products', 'top-rated', 'latest-products', 'best-sellers'))), array("type" => "dropdown", "heading" => "Columns", "param_name" => "columns", "admin_label" => true, "value" => array('Four Columns' => "4", 'Three Columns' => "3", 'Two Columns' => "2"), "description" => "Select the layout of the products.")), "description" => "Add WooCommerce products"));
// Product List
Exemplo n.º 2
0
    /**
     * @see Walker::start_el()
     * @since 3.0.0
     *
     * @param string $output Passed by reference. Used to append additional content.
     * @param object $item Menu item data object.
     * @param int $depth Depth of menu item. Used for padding.
     * @param object $args
     */
    function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0)
    {
        global $_wp_nav_menu_max_depth;
        $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
        $indent = $depth ? str_repeat("\t", $depth) : '';
        ob_start();
        $item_id = esc_attr($item->ID);
        $removed_args = array('action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce');
        $original_title = '';
        if ('taxonomy' == $item->type) {
            $original_title = get_term_field('name', $item->object_id, $item->object, 'raw');
            if (is_wp_error($original_title)) {
                $original_title = false;
            }
        } elseif ('post_type' == $item->type) {
            $original_object = get_post($item->object_id);
            $original_title = $original_object->post_title;
        }
        $classes = array('menu-item menu-item-depth-' . $depth, 'menu-item-' . esc_attr($item->object), 'menu-item-edit-' . (isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] ? 'active' : 'inactive'));
        $title = $item->title;
        if (!empty($item->_invalid)) {
            $classes[] = 'menu-item-invalid';
            /* translators: %s: title of menu item which is invalid */
            $title = sprintf(__('%s (Invalid)', THB_THEME_NAME), $item->title);
        } elseif (isset($item->post_status) && 'draft' == $item->post_status) {
            $classes[] = 'pending';
            /* translators: %s: title of menu item in draft status */
            $title = sprintf(__('%s (Pending)', THB_THEME_NAME), $item->title);
        }
        $title = empty($item->label) ? $title : $item->label;
        ?>
        <li id="menu-item-<?php 
        echo $item_id;
        ?>
" class="<?php 
        echo implode(' ', $classes);
        ?>
">
            <dl class="menu-item-bar">
                <dt class="menu-item-handle">
                    <span class="item-title"><?php 
        echo esc_html($title);
        ?>
</span>
                    <span class="item-controls">
                        <span class="item-type"><?php 
        echo esc_html($item->type_label);
        ?>
</span>
                        <span class="item-order hide-if-js">
                            <a href="<?php 
        echo wp_nonce_url(add_query_arg(array('action' => 'move-up-menu-item', 'menu-item' => $item_id), remove_query_arg($removed_args, admin_url('nav-menus.php'))), 'move-menu_item');
        ?>
" class="item-move-up"><abbr title="<?php 
        esc_attr_e('Move up', THB_THEME_NAME);
        ?>
">&#8593;</abbr></a>
                            |
                            <a href="<?php 
        echo wp_nonce_url(add_query_arg(array('action' => 'move-down-menu-item', 'menu-item' => $item_id), remove_query_arg($removed_args, admin_url('nav-menus.php'))), 'move-menu_item');
        ?>
" class="item-move-down"><abbr title="<?php 
        esc_attr_e('Move down', THB_THEME_NAME);
        ?>
">&#8595;</abbr></a>
                        </span>
                        <a class="item-edit" id="edit-<?php 
        echo $item_id;
        ?>
" title="<?php 
        esc_attr_e('Edit Menu Item', THB_THEME_NAME);
        ?>
" href="<?php 
        echo isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] ? admin_url('nav-menus.php') : add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url('nav-menus.php#menu-item-settings-' . $item_id)));
        ?>
"><?php 
        _e('Edit Menu Item', THB_THEME_NAME);
        ?>
</a>
                    </span>
                </dt>
            </dl>
    
            <div class="menu-item-settings" id="menu-item-settings-<?php 
        echo $item_id;
        ?>
">
                <?php 
        if ('custom' == $item->type) {
            ?>
                    <p class="field-url description description-wide">
                        <label for="edit-menu-item-url-<?php 
            echo $item_id;
            ?>
">
                            <?php 
            _e('URL', THB_THEME_NAME);
            ?>
<br />
                            <input type="text" id="edit-menu-item-url-<?php 
            echo $item_id;
            ?>
" class="widefat code edit-menu-item-url" name="menu-item-url[<?php 
            echo $item_id;
            ?>
]" value="<?php 
            echo esc_attr($item->url);
            ?>
" />
                        </label>
                    </p>
                <?php 
        }
        ?>
                <p class="description description-thin">
                    <label for="edit-menu-item-title-<?php 
        echo $item_id;
        ?>
">
                        <?php 
        _e('Navigation Label', THB_THEME_NAME);
        ?>
<br />
                        <input type="text" id="edit-menu-item-title-<?php 
        echo $item_id;
        ?>
" class="widefat edit-menu-item-title" name="menu-item-title[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->title);
        ?>
" />
                    </label>
                </p>
                <p class="description description-thin">
                    <label for="edit-menu-item-attr-title-<?php 
        echo $item_id;
        ?>
">
                        <?php 
        _e('Title Attribute', THB_THEME_NAME);
        ?>
<br />
                        <input type="text" id="edit-menu-item-attr-title-<?php 
        echo $item_id;
        ?>
" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->post_excerpt);
        ?>
" />
                    </label>
                </p>
                <p class="field-link-target description">
                    <label for="edit-menu-item-target-<?php 
        echo $item_id;
        ?>
">
                        <input type="checkbox" id="edit-menu-item-target-<?php 
        echo $item_id;
        ?>
" value="_blank" name="menu-item-target[<?php 
        echo $item_id;
        ?>
]"<?php 
        checked($item->target, '_blank');
        ?>
 />
                        <?php 
        _e('Open link in a new window/tab', THB_THEME_NAME);
        ?>
                    </label>
                </p>
                <p class="field-css-classes description description-thin">
                    <label for="edit-menu-item-classes-<?php 
        echo $item_id;
        ?>
">
                        <?php 
        _e('CSS Classes (optional)', THB_THEME_NAME);
        ?>
<br />
                        <input type="text" id="edit-menu-item-classes-<?php 
        echo $item_id;
        ?>
" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr(implode(' ', $item->classes));
        ?>
" />
                    </label>
                </p>
                <p class="field-xfn description description-thin">
                    <label for="edit-menu-item-xfn-<?php 
        echo $item_id;
        ?>
">
                        <?php 
        _e('Link Relationship (XFN)', THB_THEME_NAME);
        ?>
<br />
                        <input type="text" id="edit-menu-item-xfn-<?php 
        echo $item_id;
        ?>
" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->xfn);
        ?>
" />
                    </label>
                </p>
                <p class="field-description description description-wide">
                    <label for="edit-menu-item-description-<?php 
        echo $item_id;
        ?>
">
                        <?php 
        _e('Description', THB_THEME_NAME);
        ?>
<br />
                        <textarea id="edit-menu-item-description-<?php 
        echo $item_id;
        ?>
" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php 
        echo $item_id;
        ?>
]"><?php 
        echo esc_html($item->description);
        // textarea_escaped
        ?>
</textarea>
                        <span class="description"><?php 
        _e('The description will be displayed in the menu if the current theme supports it.', THB_THEME_NAME);
        ?>
</span>
                    </label>
                </p>


                <div class="clearboth"></div>
                <div class="thb_menu_options">
                	<h2><?php 
        _e('Fuel Themes Menu Options', THB_THEME_NAME);
        ?>
</h2>   
	                <p class="field-link-mega">
	                  <h3><?php 
        _e('Menu Item Icon', THB_THEME_NAME);
        ?>
</h3>
	                  <?php 
        $saved = get_post_meta($item_id, '_menu_item_menuicon', true);
        ?>
	                  <select id="edit-menu-item-menuicon-<?php 
        echo $item_id;
        ?>
" name="edit-menu-item-menuicon[<?php 
        echo $item_id;
        ?>
]">
	                  	
	                  	<?php 
        foreach (thb_getIconArray() as $key => $value) {
            ?>
	                  		<?php 
            $selected = $value === $saved ? " selected" : "";
            ?>
	                  		<option value="<?php 
            echo $key;
            ?>
"<?php 
            echo $selected;
            ?>
><?php 
            echo $value;
            ?>
</option>
	                  	<?php 
        }
        ?>
	                  </select>
	                </p>
	                <p class="field-link-mega">
	                	<h3><?php 
        _e('Mega Menu', THB_THEME_NAME);
        ?>
</h3>
	                    <?php 
        $value = get_post_meta($item_id, '_menu_item_megamenu', true);
        if ($value != "") {
            $value = "checked='checked'";
        }
        ?>
	                    <label for="edit-menu-item-megamenu-<?php 
        echo $item_id;
        ?>
">
	                        <input type="checkbox" value="enabled" id="edit-menu-item-megamenu-<?php 
        echo $item_id;
        ?>
" name="edit-menu-item-megamenu[<?php 
        echo $item_id;
        ?>
]" <?php 
        echo $value;
        ?>
 />
	                        <?php 
        _e('Make this item Mega Menu?', THB_THEME_NAME);
        ?>
	                        <small><?php 
        _e('This works for first level items only', THB_THEME_NAME);
        ?>
</small>
	                    </label>
	                </p>  
	            </div>
           

                <div class="menu-item-actions description-wide submitbox">
                    <?php 
        if ('custom' != $item->type && $original_title !== false) {
            ?>
                        <p class="link-to-original">
                            <?php 
            printf(__('Original: %s', THB_THEME_NAME), '<a href="' . esc_attr($item->url) . '">' . esc_html($original_title) . '</a>');
            ?>
                        </p>
                    <?php 
        }
        ?>
                    <a class="item-delete submitdelete deletion" id="delete-<?php 
        echo $item_id;
        ?>
" href="<?php 
        echo wp_nonce_url(add_query_arg(array('action' => 'delete-menu-item', 'menu-item' => $item_id), remove_query_arg($removed_args, admin_url('nav-menus.php'))), 'delete-menu_item_' . $item_id);
        ?>
"><?php 
        _e('Remove', THB_THEME_NAME);
        ?>
</a> <span class="meta-sep"> | </span> <a class="item-cancel submitcancel" id="cancel-<?php 
        echo $item_id;
        ?>
" href="<?php 
        echo esc_url(add_query_arg(array('edit-menu-item' => $item_id, 'cancel' => time()), remove_query_arg($removed_args, admin_url('nav-menus.php'))));
        ?>
#menu-item-settings-<?php 
        echo $item_id;
        ?>
"><?php 
        _e('Cancel', THB_THEME_NAME);
        ?>
</a>
                </div>
    
                <input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo $item_id;
        ?>
" />
                <input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->object_id);
        ?>
" />
                <input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->object);
        ?>
" />
                <input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->menu_item_parent);
        ?>
" />
                <input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->menu_order);
        ?>
" />
                <input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->type);
        ?>
" />
            </div><!-- .menu-item-settings-->
            <ul class="menu-item-transport"></ul>
        <?php 
        $output .= ob_get_clean();
    }
<?php

#-----------------------------------------------------------------
# Elements
#-----------------------------------------------------------------
$thb_shortcodes['header_2'] = array('type' => 'heading', 'title' => __('Elements'));
$thb_shortcodes['small_title'] = array('type' => 'regular', 'title' => __('Small Title'), 'attr' => array('title' => array('type' => 'text', 'title' => 'Title')));
$thb_shortcodes['thb_button'] = array('type' => 'regular', 'title' => __('Button', THB_THEME_NAME), 'attr' => array('size' => array('type' => 'radio', 'title' => __('Size', THB_THEME_NAME), 'opt' => array('small' => 'Small', 'medium' => 'Medium', 'large' => 'Large')), 'color' => array('type' => 'radio', 'title' => __('Color', THB_THEME_NAME), 'opt' => array('regular' => 'Regular', 'black' => 'Black', 'white' => 'White')), 'animation' => array('type' => 'radio', 'title' => __('Animation', THB_THEME_NAME), 'opt' => array("" => "None", "animation right-to-left" => "Left", "animation left-to-right" => "Right", "animation bottom-to-top" => "Top", "animation top-to-bottom" => "Bottom", "animation scale" => "Scale", "animation fade-in" => "Fade")), 'icon' => array('type' => 'text', 'title' => __('Icon', THB_THEME_NAME)), 'title' => array('type' => 'text', 'title' => __('Buton Text', THB_THEME_NAME)), 'link' => array('type' => 'text', 'title' => __('Buton Link', THB_THEME_NAME)), 'target_blank' => array('type' => 'checkbox', 'title' => __('Open in New Window?', THB_THEME_NAME), 'desc' => 'Opens the button link in new window')));
$thb_shortcodes['quote'] = array('type' => 'regular', 'title' => __('Quotes'), 'attr' => array('align' => array('type' => 'radio', 'title' => __('Alignment'), 'opt' => array('normal' => 'Normal', 'pullleft' => 'Pull Left', 'pullright' => 'Pull Right')), 'content' => array('type' => 'textarea', 'title' => __('Content')), 'author' => array('type' => 'text', 'title' => 'Quote Author')));
$thb_shortcodes['tags'] = array('type' => 'regular', 'title' => __('Highlights', THB_THEME_NAME), 'attr' => array('color' => array('type' => 'radio', 'title' => __('Color', THB_THEME_NAME), 'opt' => array('blue' => 'Accent', 'gray' => 'Gray')), 'text' => array('type' => 'text', 'title' => __('Text', THB_THEME_NAME))));
$thb_shortcodes['dropcap'] = array('type' => 'regular', 'title' => __('Dropcap', THB_THEME_NAME), 'attr' => array('boxed' => array('type' => 'radio', 'title' => __('Color', THB_THEME_NAME), 'opt' => array('white' => 'White', 'black' => 'Black'))));
$thb_shortcodes['single_icon'] = array('type' => 'regular', 'title' => __('Single Icon'), 'attr' => array('icon' => array('type' => 'select', 'title' => __('Icon'), 'values' => thb_getIconArray()), 'size' => array('type' => 'radio', 'title' => __('Icon Size'), 'opt' => array('icon-1x' => '1x', 'icon-2x' => '2x', 'icon-3x' => '3x', 'icon-4x' => '4x')), 'boxed' => array('type' => 'checkbox', 'title' => __('Boxed?'), 'desc' => 'Boxed contains the icon inside a box'), 'icon_link' => array('type' => 'text', 'title' => __('Icon Link'), 'desc' => 'If you would like to link the icon to an url, enter it here. (Boxed option should be checked)')));
Exemplo n.º 4
0
{
}
// Products
vc_map(array("name" => __("Products", THB_THEME_NAME), "base" => "thb_product", "icon" => "thb_vc_ico_product", "class" => "thb_vc_sc_product", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => "Product Sort", "param_name" => "product_sort", "value" => array('Best Sellers' => "best-sellers", 'Latest Products' => "latest-products", 'Top Rated' => "top-rated", 'Sale Products' => "sale-products", 'By Category' => "by-category", 'By Product ID' => "by-id"), "description" => "Select the order of the products you'd like to show."), array("type" => "checkbox", "heading" => "Product Category", "param_name" => "cat", "value" => thb_productCategories(), "description" => "Select the order of the products you'd like to show.", "dependency" => array('element' => "product_sort", 'value' => array('by-category'))), array("type" => "textfield", "heading" => "Product IDs", "param_name" => "product_ids", "description" => "Enter the products IDs you would like to display seperated by comma", "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "dropdown", "heading" => "Carousel", "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => "Select yes to display the products in a carousel."), array("type" => "textfield", "class" => "", "heading" => "Number of Items", "param_name" => "item_count", "value" => "4", "description" => "The number of products to show.", "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'sale-products', 'top-rated', 'latest-products', 'best-sellers'))), array("type" => "dropdown", "heading" => "Columns", "param_name" => "columns", "admin_label" => true, "value" => array('Four Columns' => "4", 'Three Columns' => "3", 'Two Columns' => "2"), "description" => "Select the layout of the products.")), "description" => "Add WooCommerce products"));
// Product List
vc_map(array("name" => __("Product List", THB_THEME_NAME), "base" => "thb_product_list", "icon" => "thb_vc_ico_product_list", "class" => "thb_vc_sc_product_list", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => "Title", "param_name" => "title", "value" => "", "admin_label" => true, "description" => "Title of the widget"), array("type" => "dropdown", "heading" => "Product Sort", "param_name" => "product_sort", "value" => array('Best Sellers' => "best-sellers", 'Latest Products' => "latest-products", 'Top Rated' => "top-rated", 'Sale Products' => "sale-products", 'By Product ID' => "by-id"), "admin_label" => true, "description" => "Select the order of the products you'd like to show."), array("type" => "textfield", "heading" => "Product IDs", "param_name" => "product_ids", "description" => "Enter the products IDs you would like to display seperated by comma", "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "textfield", "class" => "", "heading" => "Number of Items", "param_name" => "item_count", "value" => "4", "description" => "The number of products to show.", "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'sale-products', 'top-rated', 'latest-products', 'best-sellers')))), "description" => "Add WooCommerce products in a list"));
// Product Categories
vc_map(array("name" => __("Product Categories", THB_THEME_NAME), "base" => "thb_product_categories", "icon" => "thb_vc_ico_product_categories", "class" => "thb_vc_sc_product_categories", "category" => "by Fuel Themes", "params" => array(array("type" => "checkbox", "heading" => "Product Category", "param_name" => "cat", "value" => thb_productCategories(), "description" => "Select the categories you would like to display"), array("type" => "dropdown", "heading" => "Carousel", "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => "Select yes to display the categories in a carousel."), array("type" => "dropdown", "heading" => "Columns", "param_name" => "columns", "admin_label" => true, "value" => array('Four Columns' => "4", 'Three Columns' => "3", 'Two Columns' => "2"), "description" => "Select the layout of the products.")), "description" => "Add WooCommerce product categories"));
// Portfolio
vc_map(array("name" => __("Portfolios", THB_THEME_NAME), "base" => "thb_portfolio", "icon" => "thb_vc_ico_portfolio", "class" => "thb_vc_sc_portfolio", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => "Carousel", "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => "Select yes to display the portfolios in a carousel."), array("type" => "textfield", "class" => "", "heading" => "Number of portfolios", "param_name" => "item_count", "value" => "4", "description" => "The number of portfolios to show."), array("type" => "dropdown", "heading" => "Columns", "param_name" => "columns", "value" => array('Six Columns' => "6", 'Five Columns' => "5", 'Four Columns' => "4", 'Three Columns' => "3", 'Two Columns' => "2"), "admin_label" => true, "description" => "Select the layout of the portfolios."), array("type" => "checkbox", "heading" => "Categories", "param_name" => "categories", "value" => thb_portfolioCategories(), "description" => "Select which categories of portfolios you would like to display."), array("type" => "checkbox", "class" => "", "heading" => "Enable Margin?", "param_name" => "margin", "value" => array("" => "true"), "dependency" => array("element" => "carousel", "value" => array('no'))), array("type" => "checkbox", "class" => "", "heading" => "Enable Grayscale?", "param_name" => "grayscale", "value" => array("" => "true")), array("type" => "checkbox", "class" => "", "heading" => "Always show Titles", "param_name" => "titles", "value" => array("" => "true"))), "description" => "Display Portfolios in columns"));
// Posts
vc_map(array("name" => __("Posts", THB_THEME_NAME), "base" => "thb_post", "icon" => "thb_vc_ico_post", "class" => "thb_vc_sc_post", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => "Carousel", "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => "Select yes to display the products in a carousel."), array("type" => "textfield", "class" => "", "heading" => "Number of posts", "param_name" => "item_count", "value" => "4", "description" => "The number of posts to show."), array("type" => "dropdown", "heading" => "Columns", "param_name" => "columns", "admin_label" => true, "value" => array('Four Columns' => "4", 'Three Columns' => "3", 'Two Columns' => "2"), "description" => "Select the layout of the posts.")), "description" => "Display Posts from your blog"));
// Progress Bar Shortcode
vc_map(array("name" => __("Progress Bar", THB_THEME_NAME), "base" => "thb_progressbar", "icon" => "thb_vc_ico_progressbar", "class" => "thb_vc_sc_progressbar", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => "Style", "param_name" => "style", "value" => array('Light' => "light", 'Dark' => "dark"), "description" => "This changes the background color and tooltip color."), array("type" => "exploded_textarea", "heading" => "Graphic values", "param_name" => "values", "description" => 'Input graph values here. Divide values with linebreaks (Enter). Example: 90|Development', "value" => "90|Development,80|Design,70|Marketing"), array("type" => "dropdown", "heading" => "Bar color", "param_name" => "bgcolor", "value" => array("Light Grey" => "lightgrey", "Black" => "black", "Blue" => "blue", "Green" => "green", "Yellow" => "yellow", "Orange" => "orange", "Pink" => "pink", "Petrol Green" => "petrol", "Gray" => "gray"), "description" => "Select bar background color.")), "description" => "Display progress bars in different colors"));
// Pricing Column shortcode
vc_map(array("name" => __("Pricing Column", THB_THEME_NAME), "base" => "thb_pricingcolumn", "icon" => "thb_vc_ico_pricingcolumn", "class" => "thb_vc_sc_pricingcolumn", "category" => "by Fuel Themes", "params" => array(array("type" => "checkbox", "class" => "", "heading" => "Featured Column?", "param_name" => "featured", "value" => array("" => "true"), "description" => "Check if you want to make this a featured column"), array("type" => "textfield", "class" => "", "heading" => "Column Name", "admin_label" => true, "param_name" => "title", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => "Currency", "param_name" => "currency", "value" => "", "description" => "\$ .."), array("type" => "textfield", "class" => "", "heading" => "Price", "param_name" => "price", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => "Per", "param_name" => "per", "value" => "", "description" => "Per month, annually, etc.."), array("type" => "exploded_textarea", "class" => "", "heading" => "Features", "param_name" => "content", "value" => "", "description" => "Every new line will be treated as a list item"), array("type" => "checkbox", "class" => "", "heading" => "Add Button?", "param_name" => "use_btn", "value" => array("" => "true"), "description" => "Check if you want to add a button."), array("type" => "textfield", "class" => "", "heading" => "Button Caption", "param_name" => "btn_caption", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "textfield", "class" => "", "heading" => "Button Link URL", "param_name" => "btn_link", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Open Button link in", "param_name" => "target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true))), "description" => "Show your packages in pricing columns"));
// Styled Header
vc_map(array("name" => __("Styled Header", THB_THEME_NAME), "base" => "thb_header", "icon" => "thb_vc_ico_styled", "class" => "thb_vc_sc_styled", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => "Style", "param_name" => "style", "value" => array('Style 1' => "style1", 'Style 2' => "style2"), "description" => "Style 1 uses icons, Style 2 adds a line below title."), array("type" => "dropdown", "heading" => "Color", "param_name" => "color", "value" => array('Dark' => "dark", 'Light' => "light"), "description" => "This changes the color. You need this if you are using a dark background."), array("type" => "textfield", "heading" => "Title", "param_name" => "title", "admin_label" => true, "description" => "Title of the header"), array("type" => "textfield", "heading" => "Sub-Title", "param_name" => "sub_title", "description" => "Sub - Title of the header."), array("type" => "dropdown", "class" => "", "heading" => "Icon", "param_name" => "icon", "value" => thb_getIconArray(), "description" => "", "dependency" => array('element' => "style", 'value' => array('style1'))), array("type" => "checkbox", "class" => "", "heading" => "Use image instead of icon?", "param_name" => "is_image", "value" => array("" => "true"), "description" => "20px width is recommended (40px) for retina.", "dependency" => array('element' => "style", 'value' => array('style1'))), array("type" => "attach_image", "class" => "", "heading" => "Select Image", "param_name" => "image", "description" => "", "dependency" => array('element' => "is_image", 'not_empty' => true))), "description" => "Add a title with icons"));
// Team Member shortcode
vc_map(array("name" => "Team Member", "base" => "thb_teammember", "icon" => "thb_vc_ico_teammember", "class" => "thb_vc_sc_teammember", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => "Select Team Member Image", "param_name" => "image", "description" => "Minimum size is 270x270 pixels"), array("type" => "textfield", "heading" => "Name", "param_name" => "name", "admin_label" => true, "description" => "Enter name of the team member"), array("type" => "textfield", "heading" => "Position", "param_name" => "position", "description" => "Enter position/title of the team member"), array("type" => "checkbox", "class" => "", "heading" => "Advanced Style?", "param_name" => "advanced", "value" => array("" => "true"), "description" => "Enable to display a short text and social icons"), array("type" => "textarea", "class" => "", "heading" => "Short text", "param_name" => "text", "value" => "", "dependency" => array("element" => "advanced", "not_empty" => true), "description" => "Text to display on hover"), array("type" => "textfield", "heading" => "Facebook", "param_name" => "facebook", "dependency" => array("element" => "advanced", "not_empty" => true), "description" => "Enter Facebook Link"), array("type" => "textfield", "heading" => "Twitter", "param_name" => "twitter", "dependency" => array("element" => "advanced", "not_empty" => true), "description" => "Enter Twitter Link"), array("type" => "textfield", "heading" => "Pinterest", "param_name" => "pinterest", "dependency" => array("element" => "advanced", "not_empty" => true), "description" => "Enter Pinterest Link"), array("type" => "textfield", "heading" => "Linkedin", "param_name" => "linkedin", "dependency" => array("element" => "advanced", "not_empty" => true), "description" => "Enter Linkedin Link")), "description" => "Display your team members in a stylish way"));
// Testimonials Shortcode
vc_map(array("name" => "Testimonials", "base" => "thb_testimonials", "icon" => "thb_vc_ico_testimonials", "class" => "thb_vc_sc_testimonials", "category" => "by Fuel Themes", "as_parent" => array('only' => 'thb_testimonial_single'), "show_settings_on_create" => true, "content_element" => true, "js_view" => 'VcColumnView', "params" => array(array("type" => "dropdown", "heading" => "Style", "param_name" => "style", "value" => array('Light' => "light", 'Dark' => "dark"), "description" => "This changes the colors depending on the background color.")), "description" => "Display testimonials from your clients"));
vc_map(array("name" => "Testimonial", "base" => "thb_testimonial_single", "icon" => "thb_vc_ico_testimonial_single", "as_child" => array('only' => 'thb_testimonials'), "content_element" => true, "params" => array(array("type" => "textarea_html", "heading" => "Quote", "param_name" => "content", "admin_label" => true, "description" => "The testimonial quote"), array("type" => "textfield", "heading" => "Author", "param_name" => "author", "description" => "The testimonial author"), array("type" => "textfield", "heading" => "Author Title", "param_name" => "title", "description" => "The testimonial author title"), array("type" => "attach_image", "class" => "", "heading" => "Author Image", "param_name" => "image", "description" => "Minimum size is 130x130 pixels")), 'js_view' => $vc_is_wp_version_3_6_more ? 'VcTabView' : 'VcTabView35', "description" => "Display testimonials from your clients"));
class WPBakeryShortCode_Thb_Testimonials extends WPBakeryShortCodesContainer
{
}
class WPBakeryShortCode_Thb_Testimonial_Single extends WPBakeryShortCode
{
}
// Thumbnail Gallery Shortcode
vc_map(array("name" => "Thumbnail Gallery", "base" => "thb_thumbnail_gallery", "icon" => "thb_vc_ico_thumbnail_gallery", "class" => "thb_vc_sc_thumbnail_gallery", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_images", "class" => "", "heading" => "Select Images", "param_name" => "images", "admin_label" => true, "description" => "")), "description" => "Add a thumbnail carousel"));