✏️ 编辑:vc-element.php
路径:
/home/forge/kingkrunch.com/wp/wp-content/plugins/templatemela-shortcodes/vc-elements/vc-element.php
大小:46.6 KB · 修改:2020-09-11 16:13:48 · 权限:0775 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php /** * Visual Composer functions * * @author Templatemela * @link http://templatmela.com */ /* --------------------------------------------------------------------------- * Shortcodes | Image compatibility * --------------------------------------------------------------------------- */ if( ! function_exists( 'tm_vc_image' ) ) { function tm_vc_image( $image = false ){ if( $image && is_numeric( $image ) ){ $image = wp_get_attachment_image_src( $image, 'full' ); $image = $image[0]; } return $image; } } /* --------------------------------------------------------------------------- * Shortcodes | Map * --------------------------------------------------------------------------- */ add_action ( 'vc_before_init', 'tm_vc_integrateWithVC' ); if( ! function_exists( 'tm_vc_integrateWithVC' ) ) { function tm_vc_integrateWithVC() { /**** Style For Accordion *****/ vc_map( array ( 'name' => __('Accordion', 'tm-opts'), 'description' => __('Style For Accordion', 'tm-opts'), 'base' => 'tm_accordion', "as_parent" => array('only' => 'accordion'), "content_element" => true, "show_settings_on_create" => true, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-accordion', 'params' => array ( array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), '2' => __('Two', 'tm-opts'), '3' => __('Three', 'tm-opts'), '4' => __('Four', 'tm-opts'), )), ), ) )); vc_map( array ( 'base' => 'accordion', 'name' => __('Accordation Content', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_accordion'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-accordion', 'params' => array ( array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Title ex.Welcome To Store', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Blog in grid or slider *****/ vc_map( array ( 'base' => 'blog_posts', 'name' => __('Blogs', 'tm-opts'), 'description' => __(' Blog in grid or slider', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-blog', 'params' => array ( array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'grid' => __('Grid', 'tm-opts'), 'slider' => __('Slider', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), '6' => __('6', 'tm-opts'), )), ), array ( 'param_name' => 'number_of_posts', 'type' => 'textfield', 'heading' => __('Total Posts', 'tm-opts'), 'description' => __('2,3,4..', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'category', 'type' => 'textfield', 'heading' => __('Category', 'tm-opts'), 'description' => __('Post Category ID', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), '2' => __('Two', 'tm-opts'), '3' => __('Three', 'tm-opts'), )), ), array ( 'param_name' => 'height', 'type' => 'textfield', 'heading' => __('Blog Height', 'tm-opts'), 'description' => __('Blog Image Height in pixel (note:enter number without px ex.300)', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'width', 'type' => 'textfield', 'heading' => __('Blog Width', 'tm-opts'), 'description' => __('Blog Width in pixel (note:enter number without px ex.300)', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Brand in grid or slider*****/ vc_map( array ( 'name' => __('Brand Logos', 'tm-opts'), 'description' => __('Brand in grid or slider', 'tm-opts'), 'base' => 'tm_logo', "as_parent" => array('only' => 'tm_logoinner'), "content_element" => true, "show_settings_on_create" => true, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-brand', 'params' => array ( array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'slider' => __('Slider', 'tm-opts'), 'grid' => __('Grid', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), '6' => __('6', 'tm-opts'), )), ), ), )); vc_map( array ( 'base' => 'tm_logoinner', 'name' => __('Logo Link', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_logo'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-multiple-link', 'params' => array ( array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Logo Image Title ex.Feature', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'link_url', 'type' => 'textfield', 'heading' => __('Link URL', 'tm-opts'), ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), array ( 'param_name' => 'image', 'type' => 'attach_image', 'description' => __('Attach here Feature Image.', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Button with Icon *****/ vc_map( array ( 'base' => 'tm_button', 'name' => __('Button', 'tm-opts'), 'description' => __('Type of button with Icon', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-button', 'params' => array ( array ( 'param_name' => 'content', 'type' => 'textfield', 'heading' => __('Button Name', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Button Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'medium' => __('Medium', 'tm-opts'), 'small' => __('Small', 'tm-opts'), 'big' => __('Big', 'tm-opts'), 'mini' => __('Mini', 'tm-opts'), )), ), array ( 'param_name' => 'icon', 'type' => 'textfield', 'heading' => __('Font Awesome Icon', 'tm-opts'), 'description' => __('fa-arrows-alt', 'tm-opts'), ), array ( 'param_name' => 'icon_align', 'type' => 'textfield', 'heading' => __('Icon Alignment', 'tm-opts'), 'description' => __('Icon Alignment ex.left,right,center', 'tm-opts'), ), array ( 'param_name' => 'background_color', 'type' => 'colorpicker', 'heading' => __('Icon Background Color', 'tm-opts'), ), array ( 'param_name' => 'link_url', 'type' => 'textfield', 'heading' => __('Link URL', 'tm-opts'), 'description' => __('ex. https://www.google.co.in/', 'tm-opts'), ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), ) )); // Category Tabs vc_map( array ( 'base' => 'woo_categories', 'name' => __('Categories Tabs', 'tm-opts'), 'description' => __('Show Category Tab wise products in grid/slider', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-tabs', 'params' => array ( array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'slider' => __('Slider', 'tm-opts'), 'grid' => __('Grid', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), '6' => __('6', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_page', 'type' => 'textfield', 'heading' => __('Items', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'category_ids', 'type' => 'textfield', 'heading' => __('Category Id', 'tm-opts'), 'description' => __('Enter ID of product category to display products(ex. 88,105,165)', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Contact Address *****/ vc_map( array ( 'base' => 'tm_address', 'name' => __('Contact Address', 'tm-opts'), 'description' => __('Display Contact Detail', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-contact_box', 'params' => array ( array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'description', 'type' => 'textfield', 'heading' => __('Description', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'address_label', 'type' => 'textfield', 'heading' => __('Address Label', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Address', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'phone_label', 'type' => 'textfield', 'heading' => __('Phone Label', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'phone', 'type' => 'textfield', 'heading' => __('Phone Number', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'email_label', 'type' => 'textfield', 'heading' => __('Email Label', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'email_link', 'type' => 'textfield', 'heading' => __('Email Link', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'email', 'type' => 'textfield', 'heading' => __('Email', 'tm-opts'), 'description' => __('Give Email Address Here', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'other_label', 'type' => 'textfield', 'heading' => __('Other Label', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'other', 'type' => 'textfield', 'heading' => __('Other', 'tm-opts'), 'description' => __('Give starting and ending time of office', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Counter *****/ vc_map( array ( 'base' => 'tm_counter', 'name' => __('Counter', 'tm-opts'), 'description' => __('Counter', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-countdown', 'params' => array ( array ( 'param_name' => 'id', 'type' => 'textfield', 'heading' => __('Unique Id', 'tm-opts'), 'description' => __('Temp1', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'start', 'type' => 'textfield', 'heading' => __('Start Number', 'tm-opts'), 'description' => __('Start Number for counter', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'end', 'type' => 'textfield', 'heading' => __('End Number', 'tm-opts'), 'description' => __('End Number for counter', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'decimal', 'type' => 'textfield', 'heading' => __('Decimal', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'duration', 'type' => 'textfield', 'heading' => __('Duration', 'tm-opts'), 'description' => __('Duration for the Counter when it ends.', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Title for the counter', 'tm-opts'), 'admin_label' => true, ), ) )); /**** About Static CMS *****/ vc_map( array ( 'base' => 'tm_static_cms', 'name' => __('CMS Banner Block', 'tm-opts'), 'description' => __('CMS Banner Block', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-cms', 'params' => array ( array ( 'param_name' => 'cmstext1', 'type' => 'textfield', 'heading' => __('Cmstext1', 'tm-opts'), 'description' => __('Cmstext1', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'cmstext2', 'type' => 'textfield', 'heading' => __('Cmstext2', 'tm-opts'), 'description' => __('Cmstext2', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'cmstext3', 'type' => 'textfield', 'heading' => __('Cmstext3', 'tm-opts'), 'description' => __('Cmstext3', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'cmstext4', 'type' => 'textfield', 'heading' => __('Cmstext4', 'tm-opts'), 'description' => __('Cmstext4', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'link_text', 'type' => 'textfield', 'heading' => __('Link Text', 'tm-opts'), 'description' => __('Link Text', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'link_url', 'type' => 'textfield', 'heading' => __('Link URL', 'tm-opts'), ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), array ( 'param_name' => 'classname', 'type' => 'textfield', 'heading' => __('Classname', 'tm-opts'), 'description' => __('extra classname', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Feature Content *****/ vc_map( array ( 'base' => 'tm_about', 'name' => __('Feature Content', 'tm-opts'), 'description' => __('Display Feature image with content', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-content', 'params' => array ( array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Title ex.Feature', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'image', 'type' => 'attach_image', 'description' => __('Attach here Feature Image.', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'image_align', 'type' => 'textfield', 'heading' => __('Image Align', 'tm-opts'), 'description' => __('Image Align ex.left,right,center', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'link_text', 'type' => 'textfield', 'heading' => __('Link Text', 'tm-opts'), ), array ( 'param_name' => 'link_url', 'type' => 'textfield', 'heading' => __('Link URL', 'tm-opts'), ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), array ( 'param_name' => 'title_margin', 'type' => 'textfield', 'heading' => __('Title Margin', 'tm-opts'), 'description' => __('Title Margin ex.20px 0 30px', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** FAQ Questions *****/ vc_map( array ( 'base' => 'faqs', 'name' => __('FAQ', 'tm-opts'), 'description' => __('List of FAQ Questions & Answers', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-faq', 'params' => array ( array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), '2' => __('Two', 'tm-opts'), )), ), array ( 'param_name' => 'category', 'type' => 'textfield', 'heading' => __('Category ID', 'tm-opts'), 'description' => __('Enter Category ID of faq categories ex.105', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Multiple Links *****/ vc_map( array ( 'name' => __('Multiple Links', 'tm-opts'), 'description' => __('Create Linkable Text', 'tm-opts'), 'base' => 'tm_links', "as_parent" => array('only' => 'link'), "content_element" => true, "show_settings_on_create" => false, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-multiple-link', )); vc_map( array ( 'base' => 'link', 'name' => __('Link', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_links'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-multiple-link', 'params' => array ( array ( 'param_name' => 'link_url', 'type' => 'textfield', 'heading' => __('Link URL', 'tm-opts'), ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Newsletter Text *****/ vc_map( array ( 'base' => 'newsletter_text', 'name' => __('Newsletter Content', 'tm-opts'), 'description' => __('Newsletter Details', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-newslatter-text', 'params' => array ( array ( 'param_name' => 'text1', 'type' => 'textfield', 'heading' => __('Widget-title', 'tm-opts'), 'description' => __('widget-title', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'text2', 'type' => 'textfield', 'heading' => __('Newsletter Text', 'tm-opts'), 'description' => __('Newsletter Text', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Lists *****/ vc_map( array ( 'name' => __('Lists', 'tm-opts'), 'description' => __('Show List of content with icon', 'tm-opts'), 'base' => 'tm_list', "as_parent" => array('only' => 'list_item'), "content_element" => true, "show_settings_on_create" => false, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-list', )); vc_map( array ( 'base' => 'list_item', 'name' => __('List Item', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_list'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-list', 'params' => array ( array ( 'param_name' => 'icon', 'type' => 'textfield', 'heading' => __('Font Awesome Icon', 'tm-opts'), 'description' => __('fa-arrows-alt', 'tm-opts'), ), array ( 'param_name' => 'color', 'type' => 'colorpicker', 'heading' => __('Icon Color', 'tm-opts'), ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Our Team *****/ vc_map( array ( 'base' => 'tm_ourteam', 'name' => __('Our Team', 'tm-opts'), 'description' => __('Display Team Member List in grid or slider', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-team', 'params' => array ( array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'grid' => __('Grid', 'tm-opts'), 'slider' => __('Slider', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), )), ), array ( 'param_name' => 'number_of_posts', 'type' => 'textfield', 'heading' => __('Total Posts', 'tm-opts'), 'description' => __('2,3,4..', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Portfolio Filter *****/ vc_map( array ( 'base' => 'tm_portfolio_filter', 'name' => __('Portfolio Filter', 'tm-opts'), 'description' => __('responsive portfolio filter gallery', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-portfolio_filter', 'params' => array ( array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), '6' => __('6', 'tm-opts'), )), ), ) )); /**** Portfolio Slider *****/ vc_map( array ( 'base' => 'tm_portfolio_slider', 'name' => __('Portfolio Slider', 'tm-opts'), 'description' => __('portfolio carousel slider ', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-portfolio_slider', 'params' => array ( array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), )), ), array ( 'param_name' => 'number_of_posts', 'type' => 'textfield', 'heading' => __('Total Posts', 'tm-opts'), 'description' => __('Enter total number of posts to display. (2,3,4..)', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'category', 'type' => 'textfield', 'heading' => __('Category', 'tm-opts'), 'description' => __('Portfolio Category ID', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Portfolio Grid *****/ vc_map( array ( 'base' => 'tm_portfolio', 'name' => __('Portfolios Grid', 'tm-opts'), 'description' => __('portfolio carousel grid', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-portfolio', 'params' => array ( array ( 'param_name' => 'column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), )), ), array ( 'param_name' => 'max', 'type' => 'textfield', 'heading' => __('Total Posts', 'tm-opts'), 'description' => __('Enter Maximum number of items to display per page. (2,3,4..)', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Pricing Table *****/ vc_map( array ( 'base' => 'tm_pricingtable', 'name' => __('Pricing Table', 'tm-opts'), 'description' => __('responsive pricing table', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-pricing_item', 'params' => array ( array ( 'param_name' => 'heading', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'selected', 'type' => 'dropdown', 'heading' => __('Featured', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'no' => __('No', 'tm-opts'), 'yes' => __('Yes', 'tm-opts') )), ), array ( 'param_name' => 'button_text', 'type' => 'textfield', 'heading' => __('Button Text', 'tm-opts'), 'description' => __('Read More', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'button_link', 'type' => 'textfield', 'heading' => __('Button Link', 'tm-opts'), 'description' => __('Link will appear only if this field will be filled.', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Button | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), array ( 'param_name' => 'price', 'type' => 'textfield', 'heading' => __('Price', 'tm-opts'), ), array ( 'param_name' => 'price_per', 'type' => 'textfield', 'heading' => __('Price for period', 'tm-opts'), ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, 'value' => '<ul><li><strong>List</strong> item</li></ul>', ), ) )); /**** Product Tabs *****/ vc_map( array ( 'name' => __('Product Tabs', 'tm-opts'), 'description' => __('Woo Product Tabs', 'tm-opts'), 'base' => 'tm_product_tabs', "as_parent" => array('only' => 'tm_tab_home'), "content_element" => true, "show_settings_on_create" => true, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-tabs', 'params' => array ( array ( 'param_name' => 'tab1_text', 'type' => 'textfield', 'heading' => __('Tab1 Title', 'tm-opts'), ), array ( 'param_name' => 'tab2_text', 'type' => 'textfield', 'heading' => __('Tab2 Title', 'tm-opts'), ), array ( 'param_name' => 'tab3_text', 'type' => 'textfield', 'heading' => __('Tab3 Title', 'tm-opts'), ), ) )); vc_map( array ( 'base' => 'tm_tab_home', 'name' => __('Product Tab Container', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_product_tabs'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-tabs', 'params' => array ( array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('ex., [woo_products type="slider" items_per_column="4" classname="woofeature"][featured_products per_page="28" columns="4" orderby="date" order="desc"][/woo_products] (HTML tags allowed)', 'tm-opts'), 'admin_label' => false, ), ) )); /**** About Static CMS *****/ vc_map( array ( 'base' => 'tm_service_cms', 'name' => __('Service CMS', 'tm-opts'), 'description' => __('Service CMS', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-cms', 'params' => array ( array ( 'param_name' => 'service_number', 'type' => 'textfield', 'heading' => __('service_number', 'tm-opts'), 'description' => __('service_number eg:1,2,3', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'image', 'type' => 'attach_image', 'heading' => __('Image', 'tm-opts'), 'description' => __('Attach image for service background from here', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'service_title', 'type' => 'textfield', 'heading' => __('Service Title', 'tm-opts'), 'description' => __('Service Title', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'description', 'type' => 'textfield', 'heading' => __('Description', 'tm-opts'), 'description' => __('Description', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Service *****/ vc_map( array ( 'base' => 'service', 'name' => __('Service', 'tm-opts'), 'description' => __('Service with different icon & styles', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-services', 'params' => array ( array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), '2' => __('Two', 'tm-opts'), '3' => __('Three', 'tm-opts'), '4' => __('Four', 'tm-opts'), )), ), array ( 'param_name' => 'color', 'type' => 'colorpicker', 'heading' => __('Icon Color', 'tm-opts'), ), array ( 'param_name' => 'icon_background_color', 'type' => 'colorpicker', 'heading' => __('Icon Background Color', 'tm-opts'), ), array ( 'param_name' => 'icon', 'type' => 'textfield', 'heading' => __('Font Awesome Icon', 'tm-opts'), 'description' => __('fa-arrows-alt', 'tm-opts'), ), array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Service Title', 'tm-opts'), ), array ( 'param_name' => 'link_text', 'type' => 'textfield', 'heading' => __('Link Text', 'tm-opts'), ), array ( 'param_name' => 'link_url', 'type' => 'textfield', 'heading' => __('Link URL', 'tm-opts'), ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Static Text *****/ vc_map( array ( 'base' => 'text', 'name' => __('Static Text', 'tm-opts'), 'description' => __('Arbitary text with HTML', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-static-text', 'params' => array ( array ( 'param_name' => 'align', 'type' => 'textfield', 'heading' => __('Text-Alignment', 'tm-opts'), 'description' => __('Text-Alignment ex.left,right,center', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Text Detail', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Custom Testimonials *****/ vc_map( array ( 'base' => 'tm_custom_testimonials', 'name' => __('Testimonials', 'tm-opts'), 'description' => __('Dispaly Custom Testimonials in grid or slider', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-testimonials', 'params' => array ( array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), )), ), array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'grid' => __('Grid', 'tm-opts'), 'slider' => __('Slider', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), )), ), array ( 'param_name' => 'number_of_posts', 'type' => 'textfield', 'heading' => __('Total Posts', 'tm-opts'), 'description' => __('2,3,4..', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'image_width', 'type' => 'textfield', 'heading' => __('Image width', 'tm-opts'), 'description' => __('Testimonial Image Width in pixel (note:enter number without px ex.300', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'image_height', 'type' => 'textfield', 'heading' => __('Image Height', 'tm-opts'), 'description' => __('Testimonial Image Height in pixel (note:enter number without px ex.300', 'tm-opts'), 'admin_label' => true, ), ) )); /**** Toggle *****/ vc_map( array ( 'name' => __('Toggle', 'tm-opts'), 'description' => __('Style For Toggle', 'tm-opts'), 'base' => 'tm_toggle', "as_parent" => array('only' => 'toggle'), "content_element" => true, "show_settings_on_create" => true, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-toggle', 'params' => array ( array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), '2' => __('Two', 'tm-opts'), '3' => __('Three', 'tm-opts'), '4' => __('Four', 'tm-opts'), )), ), ) )); vc_map( array ( 'base' => 'toggle', 'name' => __('Toggle Content', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_toggle'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-toggle', 'params' => array ( array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Title ex.Welcome To Store', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Tabs *****/ vc_map( array ( 'name' => __('Tabs', 'tm-opts'), 'description' => __('Horizontal and Vertical tabs with different styles', 'tm-opts'), 'base' => 'tm_tabs', "as_parent" => array('only' => 'tm_tab'), "content_element" => true, "show_settings_on_create" => true, "js_view" => 'VcColumnView', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-tabs', 'params' => array ( array ( 'param_name' => 'style', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('One', 'tm-opts'), '2' => __('Two', 'tm-opts'), '3' => __('Three', 'tm-opts'), )), ), array ( 'param_name' => 'tab_type', 'type' => 'dropdown', 'heading' => __('Tab Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'horizontal' => __('Horizontal', 'tm-opts'), 'vertical' => __('Vertical', 'tm-opts'), )), ), ) )); vc_map( array ( 'base' => 'tm_tab', 'name' => __('Tab', 'tm-opts'), "content_element" => true, "as_child" => array('only' => 'tm_tabs'), "show_settings_on_create" => true, 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-tabs', 'params' => array ( array ( 'param_name' => 'title', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Title ex.Welcome To Store', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('HTML tags allowed', 'tm-opts'), 'admin_label' => false, ), ) )); /**** Title *****/ vc_map( array ( 'base' => 'title', 'name' => __('Title', 'tm-opts'), 'description' => __('Identifying name of content or block', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-fancy_heading', 'params' => array ( array ( 'param_name' => 'content', 'type' => 'textfield', 'heading' => __('Title', 'tm-opts'), 'description' => __('Title ex.Welcome', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'size', 'type' => 'textfield', 'heading' => __('Text Size', 'tm-opts'), 'description' => __('Text Size ex.big,small,medium', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'align', 'type' => 'textfield', 'heading' => __('Text Align', 'tm-opts'), 'description' => __('Text Align ex.left,right,center', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'classname', 'type' => 'textfield', 'heading' => __('Classname', 'tm-opts'), 'description' => __('extra classname', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'color', 'type' => 'colorpicker', 'heading' => __('Text Color', 'tm-opts'), ), ) )); /**** Woo Products *****/ vc_map( array ( 'base' => 'woo_products', 'name' => __('Woo Products', 'tm-opts'), 'description' => __('Woo Products in grid or slider', 'tm-opts'), 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-woo-pro', 'params' => array ( array ( 'param_name' => 'type', 'type' => 'dropdown', 'heading' => __('Type', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( 'slider' => __('Slider', 'tm-opts'), 'grid' => __('Grid', 'tm-opts'), )), ), array ( 'param_name' => 'items_per_column', 'type' => 'dropdown', 'heading' => __('Items Per Column', 'tm-opts'), 'description' => __('Enter number of items to display per column.', 'tm-opts'), 'admin_label' => false, 'value' => array_flip(array( '1' => __('1', 'tm-opts'), '2' => __('2', 'tm-opts'), '3' => __('3', 'tm-opts'), '4' => __('4', 'tm-opts'), '5' => __('5', 'tm-opts'), '6' => __('6', 'tm-opts'), )), ), array ( 'param_name' => 'classname', 'type' => 'textfield', 'heading' => __('Classname', 'tm-opts'), 'description' => __('Classname', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'content', 'type' => 'textarea', 'heading' => __('Content', 'tm-opts'), 'description' => __('[featured_products per_page="28" columns="3" orderby="date" order="desc"] (HTML tags allowed)', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'no_more', 'type' => 'textfield', 'heading' => __('No more Products', 'tm-opts'), 'description' => __('no more product description for grid style', 'tm-opts'), 'admin_label' => true, ), ) )); /**** woo category *****/ vc_map( array ( 'name' => __('Woo Category', 'tm-opts'), 'description' => __('Woo Category', 'tm-opts'), 'base' => 'woo_sub_categories', 'category' => __('Templatemela Builder', 'tm-opts'), 'icon' => 'tm-vc-icon-accordion', 'params' => array ( array ( 'param_name' => 'category_ids', 'type' => 'textfield', 'heading' => __('category id', 'tm-opts'), ), array ( 'param_name' => 'height', 'type' => 'textfield', 'heading' => __('Category Image Height', 'tm-opts'), 'description' => __('Category Image Height in pixel (note:enter number without px ex.300)', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'width', 'type' => 'textfield', 'heading' => __('Category Image Width', 'tm-opts'), 'description' => __('Category Image Width in pixel (note:enter number without px ex.300)', 'tm-opts'), 'admin_label' => false, ), array ( 'param_name' => 'link_text', 'type' => 'textfield', 'heading' => __('Link Text', 'tm-opts'), 'description' => __('Link Text', 'tm-opts'), 'admin_label' => true, ), array ( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => __('Link | Target', 'tm-opts'), 'admin_label' => false, 'value' => array_flip( array( '' => 'Default | _self', '_blank' => 'New Tab or Window | _blank' , )), ), ) )); } } ?>
💾 保存
取消
保存为 UTF-8,换行统一为 LF