コード例 #1
3
function wps_vc_column_inner_shortcode()
{
    vc_remove_param('vc_column_inner', 'css');
    vc_remove_param('vc_column_inner', 'offset');
    vc_remove_param('vc_column_inner', 'el_class');
    // vc_remove_param('vc_column__inner','full_height');
    // vc_remove_param('vc_column__inner','equal_height');
    // vc_remove_param('vc_column__inner','columns_placement');
    // vc_remove_param('vc_column__inner','content_placement');
    // vc_remove_param('vc_column__inner','video_bg');
    // vc_remove_param('vc_column__inner','parallax');
    // vc_remove_param('vc_column__inner','el_id');
    // vc_remove_param('vc_column__inner','video_bg_url');
    // vc_remove_param('vc_column__inner','video_bg_parallax');
    // vc_remove_param('vc_column__inner','parallax_image');
    // vc_remove_param('vc_column__inner','parallax_speed_bg');
    // vc_remove_param('vc_column__inner','parallax_speed_video');
    //Get VC gallery shortcode config
    //$shortcode_vc_gallery_tmp = WPBMap::getShortCode('vc_column');
    //Loop over config to find the condition we want to change
    //foreach($shortcode_vc_gallery_tmp['params'] as $key => $param)
    //{
    //
    //}
    //VC doesn't like even the thought of you changing the shortcode base, and errors out, so we unset it.
    //unset($shortcode_vc_gallery_tmp['base']);
    //Update the actual parameter
    //vc_map_update('vc_column', $shortcode_vc_gallery_tmp);
    $attributes = array(array('type' => 'wps_column_offset', 'heading' => __('Responsiveness', 'wps-prime'), 'param_name' => 'layout_width', 'group' => __('Responsive Options', 'wps-prime'), 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'wps-prime')), array('type' => 'textfield', 'heading' => "Column item class", 'param_name' => 'class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Column item', 'wps-prime'), 'description' => __('Add optional CSS classes to the layout__item element', 'wps-prime')), array('type' => 'attach_image', 'heading' => "Bg Image", 'admin_label' => true, 'param_name' => 'inner_img', 'value' => '', 'group' => esc_html__('Inner element', 'wps-prime'), 'description' => __('Add image to be used as a background. Limit to 1 image', 'wps-prime')), array('type' => 'dropdown', 'heading' => "Background image size", 'param_name' => 'inner_img_size', 'admin_label' => true, 'value' => wps_image_sizes(), 'std' => 'full', 'group' => esc_html__('Inner element', 'wps-prime'), 'description' => __('Select background image size (image will be stretched)', 'wps-prime')), array('type' => 'textfield', 'heading' => "Column item inner element class", 'param_name' => 'inner_class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Inner element', 'wps-prime'), 'description' => __('Add optional CSS classes to the layout__item_inner element', 'wps-prime')), array('type' => 'checkbox', 'heading' => "Inner element turn off", 'param_name' => 'inner', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Inner element', 'wps-prime'), 'description' => __('Turn off the inner element (by default true if inner_class is specified )', 'wps-prime')));
    vc_add_params('vc_column_inner', $attributes);
    vc_map_update('vc_column_inner', array('html_template' => locate_template('vc_templates/vc_column_inner.php')));
}
コード例 #2
0
/**
 * Add extra params for this template to VC element.
 */
function mm_posts_image_grid_extra_vc_params()
{
    $image_grid_params = array();
    $image_grid_params[] = array('type' => 'checkbox', 'heading' => __('Titles Inside Images?', 'mm-components'), 'param_name' => 'image_grid_titles_inside', 'description' => __('Image Grid Option: This will position the post titles inside the images.', 'mm-components'), 'value' => array(__('Yes', 'mm-components') => 1), 'dependency' => array('element' => 'template', 'value' => 'image-grid'));
    $image_grid_params[] = array('type' => 'checkbox', 'heading' => __('No Gutter Mode?', 'mm-components'), 'param_name' => 'image_grid_no_gutter', 'description' => __('Image Grid Option: This will remove the padding between the images.', 'mm-components'), 'value' => array(__('Yes', 'mm-components') => 1), 'dependency' => array('element' => 'template', 'value' => 'image-grid'));
    vc_add_params('mm_posts', $image_grid_params);
}
コード例 #3
0
 /**
  * Add new params or add new shortcode to VC
  *
  * @since 1.0
  *
  * @return void
  */
 function map_shortcodes()
 {
     // Add attribues to vc_row
     vc_remove_param('vc_row', 'video_bg');
     vc_remove_param('vc_row', 'video_bg_url');
     $attributes = array(array('type' => 'textfield', 'heading' => 'ID', 'param_name' => 'css_id', 'value' => '', 'description' => __('Set CSS id for this row', 'onehost')), array('type' => 'checkbox', 'heading' => __('Full width content', ''), 'param_name' => 'full_content', 'value' => array(__('Enable', 'onehost') => 'yes'), 'description' => __('Select it if you want your content to be displayed in full width of page', 'onehost')), array('type' => 'checkbox', 'heading' => __('Enable Parallax effect', 'onehost'), 'param_name' => 'parallax', 'group' => __('Design Options', 'onehost'), 'value' => array(__('Enable', 'onehost') => 'yes'), 'description' => __('Enable this option if you want to have parallax effect on this row. When you enable this option, please set background repeat option as "Theme defaults" to make it works.', 'onehost')), array('type' => 'colorpicker', 'heading' => __('Overlay', 'onehost'), 'param_name' => 'overlay', 'group' => __('Design Options', 'onehost'), 'value' => '', 'description' => __('Select an overlay color for this row', 'onehost')), array('type' => 'checkbox', 'heading' => __('Particleground animated', 'onehost'), 'param_name' => 'particleground_bg', 'group' => __('Design Options', 'onehost'), 'value' => array(__('Show', 'onehost') => 'true'), 'description' => __('Show particleground animated', 'onehost')), array('type' => 'colorpicker', 'heading' => __('Dot Color', 'onehost'), 'param_name' => 'dot_color', 'group' => __('Design Options', 'onehost'), 'value' => '', 'description' => __('Select an dot color for particleground', 'onehost'), 'dependency' => array('element' => 'particleground_bg', 'value' => 'true')), array('type' => 'colorpicker', 'heading' => __('Line Color', 'onehost'), 'param_name' => 'line_color', 'group' => __('Design Options', 'onehost'), 'value' => '', 'description' => __('Select an line color for particleground', 'onehost'), 'dependency' => array('element' => 'particleground_bg', 'value' => 'true')), array('type' => 'checkbox', 'heading' => __('Youtube Video Background', 'onehost'), 'param_name' => 'yt_video_bg', 'group' => __('Design Options', 'onehost'), 'value' => array(__('Show', 'onehost') => 'true'), 'description' => __('Show Youtube Video Background', 'onehost')), array('type' => 'textfield', 'heading' => __('Youtube URL', 'onehost'), 'param_name' => 'video_bg', 'group' => __('Design Options', 'onehost'), 'value' => '', 'description' => __('Enter an valid Youtube URL for video background. For better performance, this option does not work on mobile.', 'onehost'), 'dependency' => array('element' => 'yt_video_bg', 'value' => 'true')), array('type' => 'checkbox', 'heading' => __('Mute Youtube Video', 'onehost'), 'param_name' => 'mute_video', 'group' => __('Design Options', 'onehost'), 'value' => array(__('Mute', 'onehost') => 'yes'), 'dependency' => array('element' => 'yt_video_bg', 'value' => 'true'), 'description' => __('Enable this option if you want to mute video by default.', 'onehost')), array('type' => 'checkbox', 'heading' => __('Show Sound Toggle Icon', 'onehost'), 'param_name' => 'show_sound_toggle', 'group' => __('Design Options', 'onehost'), 'value' => array(__('Show', 'onehost') => 'yes'), 'dependency' => array('element' => 'yt_video_bg', 'value' => 'true'), 'description' => __('Enable this option if you want to show a sound toggle icon at the bottom of this row.', 'onehost')));
     vc_add_params('vc_row', $attributes);
     vc_remove_param('vc_row', 'full_width');
     vc_remove_param('vc_row', 'parallax_image');
     vc_remove_param('vc_row', 'video_bg_parallax');
     vc_remove_param('vc_row', 'full_height');
     vc_remove_param('vc_row', 'content_placement');
     vc_remove_param('vc_row', 'el_id');
     // Add section title shortcode
     vc_map(array('name' => __('Section Title', 'onehost'), 'base' => 'section_title', 'class' => '', 'category' => __('Content', 'onehost'), 'admin_enqueue_css' => THEME_URL . '/css/vc/icon-field.css', 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'onehost'), 'param_name' => 'content', 'value' => '', 'description' => __('Enter the title content', 'onehost')), array('type' => 'colorpicker', 'holder' => 'div', 'heading' => __('Text Color', 'onehost'), 'param_name' => 'color', 'value' => '', 'description' => __('Set text color for this section title. Leave empty to use the default color of theme.', 'onehost')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Text Alignment', 'onehost'), 'param_name' => 'text_align', 'value' => array(__('Align Center', 'onehost') => 'align-center', __('Align Left', 'onehost') => 'align-left', __('Align Right', 'onehost') => 'align-right'), 'description' => __('Select text alignment for this section title.', 'onehost')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Style', 'onehost'), 'param_name' => 'style', 'value' => array(__('Default', 'onehost') => '', __('Border', 'onehost') => 's-border'), 'description' => __('Select style for this section title.', 'onehost')), array('type' => 'textarea', 'holder' => 'div', 'heading' => __('Description', 'onehost'), 'param_name' => 'desc', 'value' => '', 'description' => __('Enter a short description for section', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'onehost'), 'param_name' => 'class_name', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'onehost')))));
     // Add section title shortcode
     vc_map(array('name' => __('Section Title 2', 'onehost'), 'base' => 'section_title_2', 'class' => '', 'category' => __('Content', 'onehost'), 'admin_enqueue_css' => THEME_URL . '/css/vc/icon-field.css', 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'onehost'), 'param_name' => 'title', 'value' => '', 'description' => __('Enter the title content', 'onehost')), array('type' => 'colorpicker', 'holder' => 'div', 'heading' => __('Text Color', 'onehost'), 'param_name' => 'color', 'value' => '', 'description' => __('Set text color for this section title. Leave empty to use the default color of theme.', 'onehost')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Text Alignment', 'onehost'), 'param_name' => 'text_align', 'value' => array(__('Align Center', 'onehost') => 'align-center', __('Align Left', 'onehost') => 'align-left', __('Align Right', 'onehost') => 'align-right'), 'description' => __('Select text alignment for this section title.', 'onehost')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Style', 'onehost'), 'param_name' => 'style', 'value' => array(__('Default', 'onehost') => '', __('Border', 'onehost') => 's-border'), 'description' => __('Select style for this section title.', 'onehost')), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Description', 'onehost'), 'param_name' => 'content', 'value' => '', 'description' => __('Enter a short description for section', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'onehost'), 'param_name' => 'class_name', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'onehost')))));
     // Add Icon Box shortcode
     vc_map(array('name' => __('Icon Box', 'onehost'), 'base' => 'icon_box', 'class' => '', 'category' => __('Content', 'onehost'), 'params' => array(array('type' => 'icon', 'holder' => 'div', 'heading' => __('Icon', 'onehost'), 'param_name' => 'icon', 'value' => ''), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Icon Position', 'onehost'), 'param_name' => 'icon_position', 'value' => array(__('Top', 'onehost') => 'top', __('Left', 'onehost') => 'left', __('Right', 'onehost') => 'right')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Border Circle Icon', 'onehost'), 'param_name' => 'border_circle', 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'colorpicker', 'holder' => 'div', 'heading' => __('Background Color', 'onehost'), 'param_name' => 'bg_color', 'value' => '', 'description' => __('Set background color for this icon box.', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'onehost'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Link', 'onehost'), 'param_name' => 'link', 'value' => '', 'description' => __('Enter URL if you want this title to have a link.', 'onehost')), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Content', 'onehost'), 'param_name' => 'content', 'value' => '', 'description' => __('Enter the content of this box', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'onehost'), 'param_name' => 'icon_class', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'onehost')))));
     // Add Image Box shortcode
     vc_map(array('name' => __('Image Box', 'onehost'), 'base' => 'image_box', 'class' => '', 'category' => __('Content', 'onehost'), 'params' => array(array('type' => 'attach_image', 'holder' => 'div', 'heading' => __('Image', 'onehost'), 'param_name' => 'image', 'value' => '', 'description' => __('Select images from media library', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Image size', 'onehost'), 'param_name' => 'image_size', 'description' => __('Enter image size. Example: tiny, thumbnail, medium, large, full. Leave empty to use "thumbnail" size.', 'onehost')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Image Style', 'onehost'), 'param_name' => 'image_style', 'value' => array(__('Default', 'onehost') => '', __('Rounded', 'onehost') => 'rounded', __('Circle', 'onehost') => 'circle')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Image Position', 'onehost'), 'param_name' => 'image_position', 'value' => array(__('Top', 'onehost') => 'top', __('Left', 'onehost') => 'left', __('Right', 'onehost') => 'right')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'onehost'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Link', 'onehost'), 'param_name' => 'link', 'value' => '', 'description' => __('Enter URL if you want this title to have a link.', 'onehost')), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Content', 'onehost'), 'param_name' => 'content', 'value' => '', 'description' => __('Enter the content of this box', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'onehost'), 'param_name' => 'icon_class', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'onehost')))));
     // Add testimonial shortcode
     vc_map(array('name' => __('Testimonials', 'onehost'), 'base' => 'testimonial', 'class' => '', 'category' => __('Content', 'onehost'), 'params' => array(array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Style', 'onehost'), 'param_name' => 'style', 'value' => array(__('Short Info', 'onehost') => 'short', __('Medium Info', 'onehost') => 'medium', __('Full Info', 'onehost') => 'full')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Number Of Testimonials', 'onehost'), 'param_name' => 'number', 'value' => 'All', 'description' => __('How many testimonials to show? Enter number or word "All".', 'onehost')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Enable Slider', 'onehost'), 'param_name' => 'slider', 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Single Item', 'onehost'), 'param_name' => 'single', 'value' => array(__('Yes', 'onehost') => 'true'), 'dependency' => array('element' => 'slider', 'value' => 'true'), 'description' => __('Display only one item.', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Slide Show Speed', 'onehost'), 'param_name' => 'speed', 'value' => '700', 'dependency' => array('element' => 'slider', 'value' => 'true'), 'description' => __('Set the speed of the slideshow cycling(in ms).', 'onehost')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Auto Play', 'onehost'), 'param_name' => 'autoplay', 'dependency' => array('element' => 'slider', 'value' => 'true'), 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Show navigation control', 'onehost'), 'param_name' => 'navigation', 'dependency' => array('element' => 'slider', 'value' => 'true'), 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Show pagination control', 'onehost'), 'param_name' => 'pagination', 'dependency' => array('element' => 'slider', 'value' => 'true'), 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'onehost'), 'param_name' => 'class_name', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'onehost')))));
     // Add images carousel shortcode
     vc_map(array('name' => __('OneHost Images Carousel', 'onehost'), 'base' => 'images_carousel', 'class' => '', 'category' => __('Content', 'onehost'), 'params' => array(array('type' => 'attach_images', 'holder' => 'div', 'heading' => __('Images', 'onehost'), 'param_name' => 'images', 'value' => '', 'description' => __('Select images from media library', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Image size', 'onehost'), 'param_name' => 'image_size', 'description' => __('Enter image size. Example: thumbnail, medium, large, full. Leave empty to use "thumbnail" size.', 'onehost')), array('type' => 'textarea', 'holder' => 'div', 'heading' => __('Custom links', 'onehost'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter).', 'onehost')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Custom link target', 'onehost'), 'param_name' => 'custom_links_target', 'value' => array(__('Same window', 'onehost') => '_self', __('New window', 'onehost') => '_blank'), 'description' => __('Select where to open custom links.', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Slides per view', 'onehost'), 'param_name' => 'number', 'value' => 4, 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode.', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Slider speed', 'onehost'), 'param_name' => 'speed', 'description' => __('Duration of animation between slides (in ms).', 'onehost')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Slider autoplay', 'onehost'), 'param_name' => 'autoplay', 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Show navigation control', 'onehost'), 'param_name' => 'navigation', 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'onehost'), 'param_name' => 'class_name', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'onehost')))));
     // Add pricing shortcode
     vc_map(array('name' => __('Pricing Table', 'onehost'), 'base' => 'pricing', 'class' => '', 'category' => __('Content', 'onehost'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'onehost'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Price', 'onehost'), 'param_name' => 'price', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Time Duration', 'onehost'), 'param_name' => 'time_duration', 'value' => ''), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Featured', 'onehost'), 'param_name' => 'featured', 'value' => array(__('Yes', 'onehost') => 'true')), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Description', 'onehost'), 'param_name' => 'content', 'value' => '', 'description' => __('Enter a short description', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Button text', 'onehost'), 'param_name' => 'btext', 'value' => __('Buy Now', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Button URL', 'onehost'), 'param_name' => 'burl', 'value' => ''))));
     // Add Animation
     $attributes = array(array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Animation', 'onehost'), 'param_name' => 'animation', 'group' => __('Animation', 'onehost'), 'description' => __('Select an animation for this column. You can see more about animation <a href="http://daneden.github.io/animate.css" target="_blank">here</a>', 'onehost'), 'value' => onehost_list_animation()), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Duration', 'onehost'), 'param_name' => 'duration', 'group' => __('Animation', 'onehost'), 'value' => '1000', 'description' => __('Duration of animation (in ms).', 'onehost')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Delay', 'onehost'), 'group' => __('Animation', 'onehost'), 'param_name' => 'delay', 'value' => '200', 'description' => __('Delay of animation (in ms).', 'onehost')));
     $elements = array('vc_column', 'vc_column_inner', 'vc_custom_heading', 'vc_button2', 'vc_button', 'vc_progress_bar', 'vc_gallery', 'vc_single_image', 'vc_column_text', 'section_title', 'section_title_2', 'icon_box', 'image_box', 'testimonial', 'images_carousel');
     foreach ($elements as $element) {
         vc_add_params($element, $attributes);
     }
 }
コード例 #4
0
function stm_update_existing_shortcodes()
{
    if (function_exists('vc_add_params')) {
        vc_add_params('vc_gallery', array(array('type' => 'dropdown', 'heading' => __('Gallery type', STM_DOMAIN), 'param_name' => 'type', 'value' => array(__('Image grid', STM_DOMAIN) => 'image_grid', __('Slick slider', STM_DOMAIN) => 'slick_slider', __('Slick slider 2', STM_DOMAIN) => 'slick_slider_2')), array('type' => 'textfield', 'heading' => __('Thumbnail size', STM_DOMAIN), 'param_name' => 'thumbnail_size', 'dependency' => array('element' => 'type', 'value' => array('slick_slider_2'))), array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN))));
        vc_add_params('vc_column_inner', array(array('type' => 'column_offset', 'heading' => __('Responsiveness', 'js_composer'), 'param_name' => 'offset', 'group' => __('Width & Responsiveness', 'js_composer'), 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'js_composer'))));
        vc_add_params('vc_separator', array(array('type' => 'dropdown', 'heading' => __('Type', STM_DOMAIN), 'param_name' => 'type', 'value' => array(__('Type 1', STM_DOMAIN) => 'type_1', __('Type 2', STM_DOMAIN) => 'type_2')), array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN))));
        vc_add_params('vc_video', array(array('type' => 'textfield', 'heading' => __('Iframe Link', STM_DOMAIN), 'param_name' => 'link'), array('type' => 'attach_image', 'heading' => __('Preview Image', STM_DOMAIN), 'param_name' => 'image')));
        vc_add_params('vc_wp_pages', array(array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN))));
        vc_add_params('vc_basic_grid', array(array('type' => 'dropdown', 'heading' => __('Gap', 'js_composer'), 'param_name' => 'gap', 'value' => array(__('0px', 'js_composer') => '0', __('1px', 'js_composer') => '1', __('2px', 'js_composer') => '2', __('3px', 'js_composer') => '3', __('4px', 'js_composer') => '4', __('5px', 'js_composer') => '5', __('10px', 'js_composer') => '10', __('15px', 'js_composer') => '15', __('20px', 'js_composer') => '20', __('25px', 'js_composer') => '25', __('30px', 'js_composer') => '30', __('35px', 'js_composer') => '35', __('40px', 'js_composer') => '40', __('45px', 'js_composer') => '45', __('50px', 'js_composer') => '50', __('55px', 'js_composer') => '55', __('60px', 'js_composer') => '60'), 'std' => '30', 'description' => __('Select gap between grid elements.', 'js_composer'), 'edit_field_class' => 'vc_col-sm-6 vc_column')));
    }
    if (function_exists('vc_remove_param')) {
        vc_remove_param('vc_cta_button2', 'h2');
        vc_remove_param('vc_cta_button2', 'content');
        vc_remove_param('vc_cta_button2', 'btn_style');
        vc_remove_param('vc_cta_button2', 'color');
        vc_remove_param('vc_cta_button2', 'size');
        vc_remove_param('vc_cta_button2', 'css_animation');
    }
    if (function_exists('vc_remove_element')) {
        vc_remove_element("vc_cta_button");
        vc_remove_element("vc_posts_slider");
        vc_remove_element("vc_icon");
        vc_remove_element("vc_pinterest");
        vc_remove_element("vc_googleplus");
        vc_remove_element("vc_facebook");
        vc_remove_element("vc_tweetmeme");
    }
}
コード例 #5
0
function stm_update_existing_shortcodes()
{
    if (function_exists('vc_add_param')) {
        $attributes = array(array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN)), array('type' => 'dropdown', 'heading' => __('Type', STM_DOMAIN), 'param_name' => 'type', 'value' => array(__('Type 1', STM_DOMAIN) => 'type_1', __('Type 2', STM_DOMAIN) => 'type_2', __('Type 3', STM_DOMAIN) => 'type_3', __('Type 4', STM_DOMAIN) => 'type_4')), array('type' => 'colorpicker', 'heading' => __('Text Color', STM_DOMAIN), 'param_name' => 'text_color'), array('type' => 'vc_link', 'class' => '', 'heading' => __('Link', STM_DOMAIN), 'param_name' => 'link'), array('type' => 'textfield', 'heading' => __('Text Font size (px)', STM_DOMAIN), 'param_name' => 'text_font_size', 'value' => ''));
        vc_add_params('vc_text_separator', $attributes);
        $attributes = array(array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN)), array('type' => 'textfield', 'heading' => __('Text Font size (px)', STM_DOMAIN), 'param_name' => 'text_font_size', 'group' => __('Design options', STM_DOMAIN), 'value' => 16), array('type' => 'colorpicker', 'heading' => __('Text Color', STM_DOMAIN), 'param_name' => 'text_color', 'group' => __('Design options', STM_DOMAIN)), array('type' => 'textfield', 'heading' => __('Text Margin`s (px)', STM_DOMAIN), 'param_name' => 'text_margins', 'group' => __('Design options', STM_DOMAIN), 'value' => '0px 0px 0px 0px'));
        vc_add_params('vc_cta_button', $attributes);
        $attributes = array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN));
        vc_add_param('vc_progress_bar', $attributes);
    }
}
コード例 #6
0
ファイル: custom-fields.php プロジェクト: ngocthangict/edo
function edo_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    kt_enqueue_custom_script();
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    vc_add_shortcode_param('edo_number', 'edo_number_settings_field');
    vc_add_shortcode_param('edo_taxonomy', 'edo_taxonomy_settings_field', KUTETHEME_PLUGIN_URL . '/js_composer/js/chosen/chosen.jquery.min.js');
    vc_add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
}
コード例 #7
0
function kt_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    kt_enqueue_custom_script();
    if (function_exists('vc_add_shortcode_param')) {
        vc_add_shortcode_param('kt_select_image', 'vc_kt_select_image_settings_field');
        vc_add_shortcode_param('kt_categories', 'vc_kt_categories_settings_field');
        vc_add_shortcode_param('kt_number', 'vc_ktnumber_settings_field');
        vc_add_shortcode_param('kt_taxonomy', 'vc_kt_taxonomy_settings_field');
        vc_add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
    } else {
        add_shortcode_param('kt_select_image', 'vc_kt_select_image_settings_field');
        add_shortcode_param('kt_categories', 'vc_kt_categories_settings_field');
        add_shortcode_param('kt_number', 'vc_ktnumber_settings_field');
        add_shortcode_param('kt_taxonomy', 'vc_kt_taxonomy_settings_field');
        add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
    }
}
コード例 #8
0
function wps_vc_row_inner_shortcode()
{
    // Remove Default Parameters
    vc_remove_param('vc_row_inner', 'full_width');
    vc_remove_param('vc_row_inner', 'gap');
    vc_remove_param('vc_row_inner', 'css');
    vc_remove_param('vc_row_inner', 'full_height');
    vc_remove_param('vc_row_inner', 'equal_height');
    vc_remove_param('vc_row_inner', 'columns_placement');
    vc_remove_param('vc_row_inner', 'content_placement');
    vc_remove_param('vc_row_inner', 'video_bg');
    vc_remove_param('vc_row_inner', 'parallax');
    vc_remove_param('vc_row_inner', 'el_id');
    vc_remove_param('vc_row_inner', 'el_class');
    vc_remove_param('vc_row_inner', 'video_bg_url');
    vc_remove_param('vc_row_inner', 'video_bg_parallax');
    vc_remove_param('vc_row_inner', 'parallax_image');
    vc_remove_param('vc_row_inner', 'parallax_speed_bg');
    vc_remove_param('vc_row_inner', 'parallax_speed_video');
    // Add custom parameters
    $attributes = array(array('type' => 'textfield', 'heading' => "Row Class (L:class)", 'admin_label' => true, 'param_name' => 'class', 'value' => '', 'group' => esc_html__('Row Layout', 'wps-prime'), 'description' => __('Add optional CSS classes to the layout element, classes can contain the column control classes defined in the theme css architecture', 'wps-prime')), array('type' => 'checkbox', 'heading' => "Add Wrapper", 'param_name' => 'wrapper', 'value' => '', 'group' => esc_html__('Row Wrapper', 'wps-prime'), 'description' => __('Add wrapper container around the layout, this is useful if you want to contain elements wne you are using the full width template. Options true/false(default false)', 'wps-prime')), array('type' => 'textfield', 'heading' => "Add Row Wrapper class (W L W)", 'admin_label' => true, 'param_name' => 'wrapper_class', 'value' => '', 'group' => esc_html__('Row Wrapper', 'wps-prime'), 'description' => __('Add optional CSS class to the wrapper (if activated). Optional classes can contain background color extra paddings or any CSS rule that would apply to the wrapper. This setting requires a good knowledge of the css architecture used in the theme', 'wps-prime')), array('type' => 'textfield', 'heading' => "Row Holder Class (H:class L H)", 'admin_label' => true, 'param_name' => 'holder_class', 'value' => '', 'group' => esc_html__('Row Holder Class / Bg Image', 'wps-prime'), 'description' => __('Add custom class to be applied on the layout outer holder element. Ex: add (predefined) class that centers the background image', 'wps-prime')), array('type' => 'attach_image', 'heading' => "Row Holder image (H L H)", 'admin_label' => true, 'param_name' => 'holder_img', 'value' => '', 'group' => esc_html__('Row Layout Holder Class / Bg Image', 'wps-prime'), 'description' => __('Add image to be used as a background for the current layout. Limit to 1 image', 'wps-prime')), array('type' => 'dropdown', 'heading' => "Row Holder background image size (H:bg-image-size L H)", 'param_name' => 'holder_img_size', 'value' => wps_image_sizes(), 'std' => 'full', 'group' => esc_html__('Row Holder Class / Bg Image', 'wps-prime'), 'description' => __('Add image to be used as a background for the current layout. Limit to 1 image', 'wps-prime')));
    vc_add_params('vc_row_inner', $attributes);
    vc_map_update('vc_row_inner', array('html_template' => locate_template('vc_templates/vc_row_inner.php')));
}
コード例 #9
0
 /**
  * Add new params or add new shortcode to VC
  *
  * @since 1.0
  *
  * @return void
  */
 function map_shortcodes()
 {
     // Add attribues to vc_row
     $attributes = array(array('type' => 'textfield', 'heading' => 'ID', 'param_name' => 'css_id', 'value' => '', 'description' => __('Set CSS id for this row', 'bigboom')), array('type' => 'checkbox', 'heading' => __('Full width content', ''), 'param_name' => 'full_content', 'value' => array(__('Enable', 'bigboom') => 'yes'), 'description' => __('Select it if you want your content to be displayed in full width of page', 'bigboom')));
     vc_add_params('vc_row', $attributes);
     vc_remove_param('vc_row', 'el_id');
     // Add attribues to vc_column_inner
     $attributes = array(array('type' => 'column_offset', 'heading' => __('Responsiveness', 'bigboom'), 'param_name' => 'offset', 'group' => __('Width & Responsiveness', 'bigboom'), 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'bigboom')));
     vc_add_params('vc_column_inner', $attributes);
     // Add products carousel shortcode
     vc_map(array('name' => __('Products Carousel', 'bigboom'), 'base' => 'products_carousel', 'class' => '', 'category' => __('Content', 'bigboom'), 'params' => array(array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Products', 'bigboom'), 'param_name' => 'products', 'value' => array(__('Recent', 'bigboom') => 'recent', __('Featured', 'bigboom') => 'featured', __('Best Selling', 'bigboom') => 'best_selling', __('Top Rated', 'bigboom') => 'top_rated', __('Sale', 'bigboom') => 'sale')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Total Products', 'bigboom'), 'param_name' => 'per_page', 'value' => '12', 'description' => __('Set numbers of products to show.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Products per view', 'bigboom'), 'param_name' => 'views', 'value' => '4', 'description' => __("Set numbers of products you want to display at the same time.", 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Columns', 'bigboom'), 'param_name' => 'columns', 'value' => '4', 'description' => __("Set numbers of columns you want to display.", 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Spacing', 'bigboom'), 'param_name' => 'spacing', 'value' => '30', 'description' => __("Set spacing between columns.", 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order By', 'bigboom'), 'param_name' => 'orderby', 'value' => array(__('', 'bigboom') => '', __('Date', 'bigboom') => 'date', __('Title', 'bigboom') => 'title', __('Menu Order', 'bigboom') => 'menu_order', __('Random', 'bigboom') => 'rand'), 'dependency' => array('element' => 'products', 'value' => array('top_rated', 'sale', 'featured')), 'description' => __('Select to order products. Leave empty to use the default order by of theme.', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order', 'bigboom'), 'param_name' => 'order', 'value' => array(__('', 'bigboom') => '', __('Ascending ', 'bigboom') => 'asc', __('Descending ', 'bigboom') => 'desc'), 'dependency' => array('element' => 'products', 'value' => array('top_rated', 'sale', 'featured')), 'description' => __('Select to sort products. Leave empty to use the default sort of theme', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Slider autoplay', 'bigboom'), 'param_name' => 'auto_play', 'value' => array(__('Yes', 'bigboom') => 'true'), 'description' => __('Enables autoplay mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Hide prev/next buttons', 'bigboom'), 'param_name' => 'hide_navigation', 'value' => array(__('Yes', 'bigboom') => 'false'), 'description' => __('If "YES" prev/next control will be removed.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'class_name', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
     // Add products carousel shortcode
     vc_map(array('name' => __('Products Carousel 2', 'bigboom'), 'base' => 'products_carousel_2', 'class' => '', 'category' => __('Content', 'bigboom'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Total Products', 'bigboom'), 'param_name' => 'per_page', 'value' => '12', 'description' => __('Set numbers of products to show.', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Categories', 'bigboom'), 'param_name' => 'taxonomies', 'value' => $this->get_taxonomies(), 'description' => __('Select taxonomies categories.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Products per view', 'bigboom'), 'param_name' => 'number', 'value' => '2', 'description' => __("Set numbers of products you want to display at the same time.", 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order By', 'bigboom'), 'param_name' => 'orderby', 'value' => array(__('Random', 'bigboom') => 'rand', __('Date', 'bigboom') => 'date', __('Title', 'bigboom') => 'title', __('Menu Order', 'bigboom') => 'menu_order'), 'description' => __('Select to order products. Leave empty to use the default order by of theme.', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order', 'bigboom'), 'param_name' => 'order', 'value' => array(__('', 'bigboom') => '', __('Ascending ', 'bigboom') => 'asc', __('Descending ', 'bigboom') => 'desc'), 'description' => __('Select to sort products. Leave empty to use the default sort of theme', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Slider autoplay', 'bigboom'), 'param_name' => 'auto_play', 'value' => array(__('Yes', 'bigboom') => 'true'), 'description' => __('Enables autoplay mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Hide prev/next buttons', 'bigboom'), 'param_name' => 'hide_navigation', 'value' => array(__('Yes', 'bigboom') => 'false'), 'description' => __('If "YES" prev/next control will be removed.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'class_name', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
     // Add products carousel shortcode
     vc_map(array('name' => __('Products Carousel 3', 'bigboom'), 'base' => 'products_carousel_3', 'class' => '', 'category' => __('Content', 'bigboom'), 'params' => array(array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Products', 'bigboom'), 'param_name' => 'products', 'value' => array(__('Recent', 'bigboom') => 'recent', __('Featured', 'bigboom') => 'featured', __('Best Selling', 'bigboom') => 'best_selling', __('Top Rated', 'bigboom') => 'top_rated', __('Sale', 'bigboom') => 'sale')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Total Products', 'bigboom'), 'param_name' => 'per_page', 'value' => '12', 'description' => __('Set numbers of products to show.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Products per view', 'bigboom'), 'param_name' => 'views', 'value' => '4', 'description' => __("Set numbers of products you want to display at the same time.", 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Columns', 'bigboom'), 'param_name' => 'columns', 'value' => '1', 'description' => __("Set numbers of columns you want to display.", 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order By', 'bigboom'), 'param_name' => 'orderby', 'value' => array(__('', 'bigboom') => '', __('Date', 'bigboom') => 'date', __('Title', 'bigboom') => 'title', __('Menu Order', 'bigboom') => 'menu_order', __('Random', 'bigboom') => 'rand'), 'dependency' => array('element' => 'products', 'value' => array('top_rated', 'sale', 'featured')), 'description' => __('Select to order products. Leave empty to use the default order by of theme.', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order', 'bigboom'), 'param_name' => 'order', 'value' => array(__('', 'bigboom') => '', __('Ascending ', 'bigboom') => 'asc', __('Descending ', 'bigboom') => 'desc'), 'dependency' => array('element' => 'products', 'value' => array('top_rated', 'sale', 'featured')), 'description' => __('Select to sort products. Leave empty to use the default sort of theme', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Slider autoplay', 'bigboom'), 'param_name' => 'auto_play', 'value' => array(__('Yes', 'bigboom') => 'true'), 'description' => __('Enables autoplay mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Hide prev/next buttons', 'bigboom'), 'param_name' => 'hide_navigation', 'value' => array(__('Yes', 'bigboom') => 'false'), 'description' => __('If "YES" prev/next control will be removed.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'class_name', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
     // Add hot deal shortcode
     vc_map(array('name' => __('Hot Deal Products', 'bigboom'), 'base' => 'hot_deal_products', 'class' => '', 'category' => __('Content', 'bigboom'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Products per view', 'bigboom'), 'param_name' => 'per_page', 'value' => '12', 'description' => __('Set numbers of products you want to display at the same time.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Columns', 'bigboom'), 'param_name' => 'columns', 'value' => '4', 'description' => __("Set numbers of columns you want to display.", 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order By', 'bigboom'), 'param_name' => 'order_by', 'value' => array(__('Date', 'bigboom') => 'date', __('Title', 'bigboom') => 'title', __('Menu Order', 'bigboom') => 'menu_order', __('Random', 'bigboom') => 'rand')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order', 'bigboom'), 'param_name' => 'order', 'value' => array(__('Descending ', 'bigboom') => 'desc', __('Ascending ', 'bigboom') => 'asc')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'class_name', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
     // Add images carousel shortcode
     vc_map(array('name' => __('BigBoom Images Carousel', 'bigboom'), 'base' => 'images_carousel', 'class' => '', 'category' => __('Content', 'bigboom'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'attach_images', 'holder' => 'div', 'heading' => __('Images', 'bigboom'), 'param_name' => 'images', 'value' => '', 'description' => __('Select images from media library', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Image size', 'bigboom'), 'param_name' => 'image_size', 'value' => $this->image_sizes(), 'description' => __('Select image size. Leave empty to use "thumbnail" size.', 'bigboom')), array('type' => 'textarea', 'holder' => 'div', 'heading' => __('Custom links', 'bigboom'), 'param_name' => 'custom_links', 'description' => __('Enter links for each slide here. Divide links with linebreaks (Enter).', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Custom link target', 'bigboom'), 'param_name' => 'custom_links_target', 'value' => array(__('Same window', 'bigboom') => '_self', __('New window', 'bigboom') => '_blank'), 'description' => __('Select where to open custom links.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Slides per view', 'bigboom'), 'param_name' => 'number', 'value' => 4, 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Slider autoplay', 'bigboom'), 'param_name' => 'auto_play', 'value' => array(__('Yes', 'bigboom') => 'true'), 'description' => __('Enables autoplay mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Hide prev/next buttons', 'bigboom'), 'param_name' => 'hide_navigation', 'value' => array(__('Yes', 'bigboom') => 'false'), 'description' => __('If "YES" prev/next control will be removed.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'class_name', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
     // Add s carousel shortcode
     vc_map(array('name' => __('BigBoom Posts Carousel', 'bigboom'), 'base' => 'posts_carousel', 'class' => '', 'category' => __('Content', 'bigboom'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Total Posts', 'bigboom'), 'param_name' => 'total', 'value' => '12'), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Categories', 'bigboom'), 'param_name' => 'categories', 'value' => $this->get_categories(), 'description' => __('Select posts categories.', 'bigboom')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order By', 'bigboom'), 'param_name' => 'order_by', 'value' => array(__('Date', 'bigboom') => 'date', __('Title', 'bigboom') => 'title', __('Modified', 'bigboom') => 'modified', __('Menu Order', 'bigboom') => 'menu_order', __('Random', 'bigboom') => 'rand')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Order', 'bigboom'), 'param_name' => 'order', 'value' => array(__('Descending ', 'bigboom') => 'desc', __('Ascending ', 'bigboom') => 'asc')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Excerpt Length (words)', 'bigboom'), 'param_name' => 'excerpt_length', 'value' => 10), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Hide Readmore Text', 'bigboom'), 'param_name' => 'hide_read_more', 'value' => array(__('Yes', 'bigboom') => 'true')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Readmore Text', 'bigboom'), 'param_name' => 'read_more_text', 'value' => __('Read More', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Slides per view', 'bigboom'), 'param_name' => 'number', 'value' => 3, 'description' => __('Set numbers of slides you want to display at the same time on slider\'s container for carousel mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Slider autoplay', 'bigboom'), 'param_name' => 'auto_play', 'value' => array(__('Yes', 'bigboom') => 'true'), 'description' => __('Enables autoplay mode.', 'bigboom')), array('type' => 'checkbox', 'holder' => 'div', 'heading' => __('Hide prev/next buttons', 'bigboom'), 'param_name' => 'hide_navigation', 'value' => array(__('Yes', 'bigboom') => 'false'), 'description' => __('If "YES" prev/next control will be removed.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'class_name', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
     // Add Icon Box shortcode
     vc_map(array('name' => __('Icon Box', 'bigboom'), 'base' => 'icon_box', 'class' => '', 'category' => __('Content', 'bigboom'), 'admin_enqueue_css' => THEME_URL . '/css/vc/icon-field.css', 'params' => array(array('type' => 'icon', 'holder' => 'div', 'heading' => __('Icon', 'bigboom'), 'param_name' => 'icon', 'value' => ''), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Icon Position', 'bigboom'), 'param_name' => 'icon_position', 'value' => array(__('Left', 'bigboom') => 'Left', __('Top', 'bigboom') => 'top')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'bigboom'), 'param_name' => 'title', 'value' => ''), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('SubTitle', 'bigboom'), 'param_name' => 'subtitle', 'value' => ''), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Content', 'bigboom'), 'param_name' => 'content', 'value' => '', 'description' => __('Enter the content of this box', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Readmore Text', 'bigboom'), 'param_name' => 'read_more_text', 'value' => __('', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Link', 'bigboom'), 'param_name' => 'link', 'value' => '', 'description' => __('Enter URL if you want this title to have a link.', 'bigboom')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Extra class name', 'bigboom'), 'param_name' => 'icon_class', 'value' => '', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'bigboom')))));
 }
コード例 #10
0
function laborator_vc_row_options()
{
    # Parallax Attributes
    $parallax_attributes = array(array('type' => 'checkbox', 'heading' => __('Parallax', 'lab_composer'), 'param_name' => 'parallax_enable', 'value' => array(__('Yes', 'lab_composer') => 'yes'), 'description' => 'Check this box if you want to enable parallax for this row.'), array('type' => 'textfield', 'heading' => __('Parallax Ratio', 'lab_composer'), 'param_name' => 'parallax_ratio', 'value' => '0.8', 'description' => __('Recommended scale: from 0.00 to 1.00.', 'lab_composer'), 'dependency' => array('element' => 'parallax_enable', 'value' => array('yes'))), array('type' => 'textfield', 'heading' => __('Parallax Opacity', 'lab_composer'), 'param_name' => 'parallax_opacity', 'value' => '', 'description' => __('Opacity to reach while exiting the viewport. Recommended scale: from 0.00 to 1.00. (Optional)', 'lab_composer'), 'dependency' => array('element' => 'parallax_enable', 'value' => array('yes'))));
    vc_add_params('vc_row', $parallax_attributes);
}
コード例 #11
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
//  0 - unsorted and appended to bottom Default
//  1 - Appended to top)
$visibilities_arr = array('vc_empty_space');
foreach ($visibilities_arr as $item) {
    vc_add_param($item, array("type" => "dropdown", "heading" => esc_html__("Visibility", 'adroit'), "param_name" => "visibility", "value" => array(esc_html__('Always Visible', 'adroit') => '', esc_html__('Visible on Phones', 'adroit') => 'visible-xs-block', esc_html__('Visible on Tablets', 'adroit') => 'visible-sm-block', esc_html__('Visible on Desktops', 'adroit') => 'visible-md-block', esc_html__('Visible on Desktops Large', 'adroit') => 'visible-lg-block', esc_html__('Hidden on Phones', 'adroit') => 'hidden-xs', esc_html__('Hidden on Tablets', 'adroit') => 'hidden-sm', esc_html__('Hidden on Desktops', 'adroit') => 'hidden-md', esc_html__('Hidden on Desktops Large', 'adroit') => 'hidden-lg'), "admin_label" => true));
}
vc_add_params("vc_custom_heading", array(array("type" => "kt_number", "heading" => esc_html__("Letter spacing", 'adroit'), "param_name" => "letter_spacing", "min" => 0, "suffix" => "px", 'group' => esc_html__('Extra', 'js_composer'))));
$composer_addons = array('blockquote.php', 'socials.php', 'gallery-grid.php', 'gallery_fullwidth.php', 'gallery-justified.php');
foreach ($composer_addons as $addon) {
    require_once KT_FW_DIR . 'js_composer/vc_addons/' . $addon;
}
コード例 #12
0
/**
 * Add extra params for this template to VC element.
*/
function mm_posts_simple_image_content_extra_vc_params()
{
    $simple_image_content_params = array();
    $simple_image_content_params[] = array('type' => 'attach_image', 'heading' => __('Fallback Image', 'mm-components'), 'param_name' => 'fallback_image', 'description' => __('Image to display when the post has no featured image.', 'mm-components'), 'dependency' => array('element' => 'template', 'value' => 'simple-image-content'));
    vc_add_params('mm_posts', $simple_image_content_params);
}
コード例 #13
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
//  0 - unsorted and appended to bottom Default
//  1 - Appended to top)
vc_add_params("vc_custom_heading", array(array("type" => "cruxstore_number", "heading" => esc_html__("Letter spacing", 'cruxstore'), "param_name" => "letter_spacing", "min" => 0, "suffix" => "px", 'group' => esc_html__('Extra', 'cruxstore'))));
vc_remove_element('vc_gallery');
vc_remove_element('vc_accordion');
vc_remove_element('vc_tabs');
vc_remove_element('vc_tour');
vc_remove_element('vc_button');
vc_remove_element('vc_button2');
vc_remove_element('vc_cta_button');
vc_remove_element('vc_cta_button2');
vc_remove_element('vc_images_carousel');
vc_remove_element('vc_flickr');
vc_remove_element('vc_posts_slider');
vc_remove_element('vc_wp_search');
vc_remove_element('vc_wp_recentcomments');
vc_remove_element('vc_wp_calendar');
vc_remove_element('vc_wp_pages');
vc_remove_element('vc_wp_tagcloud');
vc_remove_element('vc_wp_custommenu');
vc_remove_element('vc_wp_text');
vc_remove_element('vc_wp_posts');
vc_remove_element('vc_wp_categories');
vc_remove_element('vc_wp_archives');
vc_remove_element('vc_wp_rss');
コード例 #14
0
ファイル: map.php プロジェクト: afquinterog/zephyr
vc_remove_element('vc_images_carousel');
/**
 * Shortcode: us_cta
 */
vc_map(array('base' => 'us_cta', 'name' => __('ActionBox', 'us'), 'icon' => 'icon-wpb-ui-separator-label', 'category' => __('Content', 'us'), 'description' => __('Call to action', 'us'), 'params' => array(array('type' => 'textfield', 'heading' => __('ActionBox Title', 'us'), 'param_name' => 'title', 'holder' => 'div', 'value' => __('This is ActionBox', 'us'), 'description' => ''), array('type' => 'textarea', 'heading' => __('ActionBox Text', 'us'), 'param_name' => 'message', 'value' => '', 'description' => ''), array('type' => 'dropdown', 'heading' => __('ActionBox Color Style', 'us'), 'param_name' => 'color', 'value' => array(__('Alternate bg | Content text', 'us') => 'alternate', __('Primary bg | White text', 'us') => 'primary', __('Secondary bg | White text', 'us') => 'secondary', __('Custom colors', 'us') => 'custom'), 'std' => 'alternate', 'description' => ''), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Background Color', 'us'), 'param_name' => 'bg_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Text Color', 'us'), 'param_name' => 'text_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => __('Button(s) Location', 'us'), 'param_name' => 'controls', 'value' => array(__('At Right', 'us') => 'right', __('At Bottom', 'us') => 'bottom'), 'std' => 'right', 'description' => ''), array('type' => 'vc_link', 'heading' => __('Button Link', 'us'), 'param_name' => 'btn_link', 'value' => '#', 'description' => ''), array('type' => 'textfield', 'heading' => __('Button Label', 'us'), 'param_name' => 'btn_label', 'value' => __('Click Me', 'us'), 'description' => '', 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Button Style', 'us'), 'param_name' => 'btn_style', 'value' => array(__('Raised', 'us') => 'raised', __('Flat', 'us') => 'flat'), 'std' => 'raised', 'description' => '', 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Button Color', 'us'), 'param_name' => 'btn_color', 'value' => array(__('Primary (theme color)', 'us') => 'primary', __('Secondary (theme color)', 'us') => 'secondary', __('Light (theme color)', 'us') => 'light', __('Contrast (theme color)', 'us') => 'contrast', __('Black', 'us') => 'black', __('White', 'us') => 'white', __('Custom colors', 'us') => 'custom'), 'std' => 'primary', 'description' => '', 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Button Background Color', 'us'), 'param_name' => 'btn_bg_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'btn_color', 'value' => 'custom')), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Button Text Color', 'us'), 'param_name' => 'btn_text_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'btn_color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => __('Button Size', 'us'), 'param_name' => 'btn_size', 'value' => array(__('Medium', 'us') => 'medium', __('Large', 'us') => 'large'), 'std' => 'medium', 'description' => '', 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'textfield', 'heading' => __('Button Icon (optional)', 'us'), 'param_name' => 'btn_icon', 'description' => sprintf(__('<a href="%s" target="_blank">FontAwesome</a> or <a href="%s" target="_blank">Material Design</a> icon', 'us'), $url_fontawesome, $url_mdfi), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Button Icon Position', 'us'), 'param_name' => 'btn_iconpos', 'value' => array(__('Left', 'us') => 'left', __('Right', 'us') => 'right'), 'std' => 'left', 'description' => '', 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'checkbox', 'heading' => '', 'param_name' => 'second_button', 'value' => array(__('Display second button', 'us') => TRUE)), array('type' => 'vc_link', 'heading' => __('Second Button Link', 'us'), 'param_name' => 'btn2_link', 'value' => '#', 'description' => '', 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE)), array('type' => 'textfield', 'heading' => __('Second Button Label', 'us'), 'param_name' => 'btn2_label', 'value' => __('Or Me', 'us'), 'description' => '', 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Second Button Style', 'us'), 'param_name' => 'btn2_style', 'value' => array(__('Raised', 'us') => 'raised', __('Flat', 'us') => 'flat'), 'std' => 'raised', 'description' => '', 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Second Button Color', 'us'), 'param_name' => 'btn2_color', 'value' => array(__('Primary (theme color)', 'us') => 'primary', __('Secondary (theme color)', 'us') => 'secondary', __('Light (theme color)', 'us') => 'light', __('Contrast (theme color)', 'us') => 'contrast', __('Black', 'us') => 'black', __('White', 'us') => 'white', __('Custom colors', 'us') => 'custom'), 'std' => 'secondary', 'description' => '', 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Button Background Color', 'us'), 'param_name' => 'btn2_bg_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'btn2_color', 'value' => 'custom')), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Button Text Color', 'us'), 'param_name' => 'btn2_text_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'btn2_color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => __('Second Button Size', 'us'), 'param_name' => 'btn2_size', 'value' => array(__('Medium', 'us') => 'medium', __('Large', 'us') => 'large'), 'std' => 'medium', 'description' => '', 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'textfield', 'heading' => __('Second Button Icon (optional)', 'us'), 'param_name' => 'btn2_icon', 'description' => sprintf(__('<a href="%s" target="_blank">FontAwesome</a> or <a href="%s" target="_blank">Material Design</a> icon', 'us'), $url_fontawesome, $url_mdfi), 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'dropdown', 'heading' => __('Second Button Icon Position', 'us'), 'param_name' => 'btn2_iconpos', 'value' => array(__('Left', 'us') => 'left', __('Right', 'us') => 'right'), 'std' => 'left', 'description' => '', 'dependency' => array('element' => 'second_button', 'not_empty' => TRUE), 'edit_field_class' => 'vc_col-sm-4 vc_column'), array('type' => 'textfield', 'heading' => __('Extra class name', 'us'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'us')))));
vc_remove_element('vc_cta');
/**
 * Modifying shortcode: vc_video
 */
vc_remove_param('vc_video', 'title');
vc_add_params('vc_video', array(array('type' => 'textfield', 'heading' => __('Video link', 'us'), 'param_name' => 'link', 'value' => 'http://vimeo.com/23237102', 'admin_label' => TRUE, 'description' => sprintf(__('Link to the video. More about supported formats at %s.', 'us'), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>')), array('type' => 'dropdown', 'heading' => __('Ratio', 'us'), 'param_name' => 'ratio', 'value' => array('16x9' => '16x9', '4x3' => '4x3', '3x2' => '3x2', '1x1' => '1x1'), 'std' => '16x9', 'description' => ''), array('type' => 'textfield', 'heading' => __('Max Width in pixels', 'us'), 'param_name' => 'max_width', 'admin_label' => TRUE, 'description' => ''), array('type' => 'dropdown', 'heading' => __('Video Alignment', 'us'), 'param_name' => 'align', 'value' => array(__('Left', 'us') => 'left', __('Center', 'us') => 'center', __('Right', 'us') => 'right'), 'std' => 'left', 'description' => '', 'dependency' => array('element' => 'max_width', 'not_empty' => TRUE))));
// The only available way to preserve param order :(
// TODO When some vc_modify_param will be available, reorder params by other means
vc_remove_param('vc_video', 'el_class');
vc_remove_param('vc_video', 'css');
vc_add_params('vc_video', array(array('type' => 'textfield', 'heading' => __('Extra class name', 'us'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'us')), array('type' => 'css_editor', 'heading' => 'CSS', 'param_name' => 'css', 'group' => __('Design options', 'us'))));
/**
 * Shortcode: us_message
 */
vc_map(array('base' => 'us_message', 'name' => __('Message Box', 'us'), 'icon' => 'icon-wpb-information-white', 'wrapper_class' => 'alert', 'category' => __('Content', 'us'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Color Style', 'us'), 'param_name' => 'color', 'value' => array(__('Notification (blue)', 'us') => 'info', __('Attention (yellow)', 'us') => 'attention', __('Success (green)', 'us') => 'success', __('Error (red)', 'us') => 'error', __('Custom colors', 'us') => 'custom'), 'std' => 'info', 'description' => ''), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Background Color', 'us'), 'param_name' => 'bg_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'colorpicker', 'holder' => 'div', 'class' => '', 'heading' => __('Text Color', 'us'), 'param_name' => 'text_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'textarea', 'holder' => 'div', 'class' => 'content', 'heading' => __('Message Text', 'us'), 'param_name' => 'content', 'value' => __('I am message box. Click edit button to change this text.', 'us')), array('type' => 'textfield', 'heading' => __('Icon (optional)', 'us'), 'param_name' => 'icon', 'value' => '', 'description' => sprintf(__('<a href="%s" target="_blank">FontAwesome</a> or <a href="%s" target="_blank">Material Design</a> icon', 'us'), $url_fontawesome, $url_mdfi)), array('type' => 'checkbox', 'heading' => '', 'param_name' => 'closing', 'value' => array(__('Enable closing', 'us') => TRUE), 'description' => ''), array('type' => 'textfield', 'heading' => __('Extra class name', 'us'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'us'))), 'js_view' => 'VcMessageView'));
vc_remove_element('vc_message');
/**
 * Shortcode: us_counter
 */
vc_map(array('base' => 'us_counter', 'name' => __('Counter', 'us'), 'icon' => 'icon-wpb-ui-separator', 'category' => __('Content', 'us'), 'params' => array(array('type' => 'textfield', 'heading' => __('The initial number value', 'us'), 'param_name' => 'initial', 'value' => '0', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'textfield', 'heading' => __('The final number value', 'us'), 'param_name' => 'target', 'value' => '99', 'holder' => 'span', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Number Color', 'us'), 'param_name' => 'color', 'value' => array(__('Heading (theme color)', 'us') => 'text', __('Primary (theme color)', 'us') => 'primary', __('Secondary (theme color)', 'us') => 'secondary', __('Custom Color', 'us') => 'custom'), 'std' => 'text', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Number Size', 'us'), 'param_name' => 'size', 'value' => array(__('Small', 'us') => 'small', __('Medium', 'us') => 'medium', __('Large', 'us') => 'large'), 'std' => 'medium', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'colorpicker', 'heading' => '', 'param_name' => 'custom_color', 'description' => '', 'dependency' => array('element' => 'color', 'value' => 'custom')), array('type' => 'textfield', 'heading' => __('Title for Counter', 'us'), 'param_name' => 'title', 'value' => __('Projects completed', 'us'), 'holder' => 'span', 'description' => ''), array('type' => 'textfield', 'heading' => __('Prefix (optional)', 'us'), 'param_name' => 'prefix', 'value' => '', 'description' => __('Text before number', 'us'), 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'textfield', 'heading' => __('Suffix (optional)', 'us'), 'param_name' => 'suffix', 'value' => '', 'description' => __('Text after number', 'us'), 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'textfield', 'heading' => __('Extra class name', 'us'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'us')))));
/**
 * Shortcode: us_feedback
 */
vc_map(array('base' => 'us_cform', 'name' => __('Contact Form', 'us'), 'icon' => 'icon-wpb-ui-separator', 'category' => __('Content', 'us'), 'params' => array(array('type' => 'textfield', 'heading' => __('Receiver Email', 'us'), 'param_name' => 'receiver_email', 'value' => '', 'description' => sprintf(__('Requests will be sent to this Email. You can insert multiple comma-separated emails as well.', 'us'))), array('type' => 'dropdown', 'heading' => __('Name field', 'us'), 'param_name' => 'name_field', 'value' => array(__('Shown, required', 'us') => 'required', __('Shown, not required', 'us') => 'shown', __('Hidden', 'us') => 'hidden'), 'std' => 'required', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Email field', 'us'), 'param_name' => 'email_field', 'value' => array(__('Shown, required', 'us') => 'required', __('Shown, not required', 'us') => 'shown', __('Hidden', 'us') => 'hidden'), 'std' => 'required', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Phone field', 'us'), 'param_name' => 'phone_field', 'value' => array(__('Shown, required', 'us') => 'required', __('Shown, not required', 'us') => 'shown', __('Hidden', 'us') => 'hidden'), 'std' => 'required', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Message field', 'us'), 'param_name' => 'message_field', 'value' => array(__('Shown, required', 'us') => 'required', __('Shown, not required', 'us') => 'shown', __('Hidden', 'us') => 'hidden'), 'std' => 'required', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Captcha field', 'us'), 'param_name' => 'captcha_field', 'value' => array(__('Hidden', 'us') => 'hidden', __('Shown, required', 'us') => 'required'), 'std' => 'hidden', 'description' => ''), array('type' => 'dropdown', 'heading' => __('Button Style', 'us'), 'param_name' => 'button_style', 'value' => array(__('Raised', 'us') => 'raised', __('Flat', 'us') => 'flat'), 'std' => 'raised', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Button Color', 'us'), 'param_name' => 'button_color', 'value' => array(__('Primary (theme color)', 'us') => 'primary', __('Secondary (theme color)', 'us') => 'secondary', __('Light (theme color)', 'us') => 'light', __('Contrast (theme color)', 'us') => 'contrast', __('Black', 'us') => 'black', __('White', 'us') => 'white', __('Custom colors', 'us') => 'custom'), 'std' => 'primary', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Button Background Color', 'us'), 'param_name' => 'button_bg_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'button_color', 'value' => 'custom')), array('type' => 'colorpicker', 'class' => '', 'heading' => __('Button Text Color', 'us'), 'param_name' => 'button_text_color', 'value' => '', 'description' => '', 'dependency' => array('element' => 'button_color', 'value' => 'custom')), array('type' => 'dropdown', 'heading' => __('Button Size', 'us'), 'param_name' => 'button_size', 'value' => array(__('Medium', 'us') => 'medium', __('Large', 'us') => 'large'), 'std' => 'medium', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'dropdown', 'heading' => __('Button Alignment', 'us'), 'param_name' => 'button_align', 'value' => array(__('Left', 'us') => 'left', __('Center', 'us') => 'center', __('Right', 'us') => 'right'), 'std' => 'left', 'description' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column'), array('type' => 'textfield', 'heading' => __('Extra class name', 'us'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'us')))));
/**
 * Shortcode: us_social_links
コード例 #15
0
/**
 * Visual Composer add-on.
 *
 * @since  1.0.0
 */
function mm_vc_social_icons()
{
    $social_icons_types = mm_get_social_icons_types_for_vc('mm-social-icons');
    $icon_styles = mm_get_icon_styles_for_vc('mm-social-icons');
    $image_sizes = mm_get_image_sizes_for_vc('mm-social-icons');
    $text_alignment = mm_get_text_alignment_for_vc('mm-social-icons');
    $colors = mm_get_colors_for_vc('mm-social-icons');
    $social_networks = mm_get_social_networks_for_vc('mm-social-icons');
    // Add our brand colors option.
    $brand_colors = array(__('Brand Colors', 'mm-components') => 'brand-colors');
    $colors = array_merge($colors, $brand_colors);
    vc_map(array('name' => __('Social Icons', 'mm-components'), 'base' => 'mm_social_icons', 'icon' => MM_COMPONENTS_ASSETS_URL . 'component-icon.png', 'category' => __('Content', 'mm-components'), 'params' => array(array('type' => 'dropdown', 'heading' => __('Icon Type', 'mm-components'), 'param_name' => 'icon_type', 'value' => $social_icons_types), array('type' => 'dropdown', 'heading' => __('Image Size', 'mm-components'), 'param_name' => 'image_size', 'value' => $image_sizes, 'dependency' => array('element' => 'icon_type', 'value' => 'images')), array('type' => 'dropdown', 'heading' => __('Icon Alignment', 'mm-components'), 'param_name' => 'alignment', 'value' => $text_alignment), array('type' => 'dropdown', 'heading' => __('Icon Style', 'mm-components'), 'param_name' => 'style', 'value' => $icon_styles, 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome')), array('type' => 'checkbox', 'heading' => __('Ghost Mode?', 'mm-components'), 'param_name' => 'ghost', 'description' => __('Colored icon and icon border with a transparent background', 'mm-components'), 'value' => array(__('Yes') => 1), 'dependency' => array('element' => 'style', 'value' => array('circle', 'square', 'rounded-square'))), array('type' => 'dropdown', 'heading' => __('Icon Color', 'mm-components'), 'param_name' => 'color', 'value' => $colors, 'dependency' => array('element' => 'icon_type', 'value' => 'fontawesome')), array('type' => 'dropdown', 'heading' => __('Icon Size', 'mm-components'), 'param_name' => 'size', 'value' => array(__('Normal', 'mm-components') => '', __('Small', 'mm-components') => 'small', __('Large', 'mm-components') => 'large')))));
    $social_network_params = array();
    foreach ($social_networks as $social_network_label => $social_network) {
        $social_network_params[] = array('type' => 'textfield', 'heading' => $social_network_label . ' ' . __('Link', 'mm-components'), 'param_name' => $social_network . '_link', 'value' => '');
        $social_network_params[] = array('type' => 'attach_image', 'heading' => $social_network_label . ' ' . __('Image', 'mm-components'), 'param_name' => $social_network . '_image', 'dependency' => array('element' => 'icon_type', 'value' => 'images'));
    }
    vc_add_params('mm_social_icons', $social_network_params);
}
コード例 #16
0
ファイル: vc_config.php プロジェクト: syncopetwice/STG
vc_remove_param('vc_row', 'el_class');
//vc_remove_param('vc_row', 'css');
vc_add_params('vc_row', array(array("type" => "checkbox", "heading" => __("Separate Section", "js_composer"), "param_name" => "section", "value" => array(__("Place row in separate section", "js_composer") => "yes")), array("type" => "dropdown", "heading" => __("Section Color Style", "js_composer"), "param_name" => "background", "value" => array(__('Main Content (default)', "js_composer") => "", __('Alternate Content', "js_composer") => "alternate", __('Primary background color & White text color', "js_composer") => "primary", __('Secondary background color & White text color', "js_composer") => "secondary"), "description" => __("The section will use the color scheme you select. Color schemes are defined at Styling tab of the Theme Options", "js_composer"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "checkbox", "heading" => __("Full Width Content", "js_composer"), "param_name" => "full_width", "value" => array(__("Stretch section content to screen width", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "checkbox", "heading" => __("Full Height Content", "js_composer"), "param_name" => "full_height", "value" => array(__("Remove vertical indents", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "attach_image", "heading" => __("Section Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Fade Background", "js_composer"), "param_name" => "bg_fade", "value" => array(__("None", "js_composer") => "", __("Fade with 30% black", "js_composer") => "black_30", __("Fade with 50% black", "js_composer") => "black_50", __("Fade with 30% white", "js_composer") => "white_30", __("Fade with 50% white", "js_composer") => "white_50"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Parallax Effect", "js_composer"), "param_name" => "parallax", "value" => array(__("None", "js_composer") => "", __("Vertical Parallax", "js_composer") => "vertical", __("Horizontal Parallax", "js_composer") => "horizontal"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Parallax Background Width", "js_composer"), "param_name" => "parallax_bg_width", "value" => array("110%" => "110", "120%" => "120", "130%" => "130", "140%" => "140", "150%" => "150"), "description" => '', "dependency" => array('element' => "parallax", 'value' => array('horizontal'))), array("type" => "dropdown", "heading" => __("Parallax Speed Factor", "js_composer"), "param_name" => "parallax_speed", "value" => array(__('Normal', "js_composer") => "normal", __('Slow', "js_composer") => "slow", __('Fast', "js_composer") => "fast", __('None (Image not moves)', "js_composer") => "still"), "description" => '', "dependency" => array('element' => "parallax", 'value' => array('vertical'))), array("type" => "checkbox", "heading" => __("Reverse Parallax", "js_composer"), "param_name" => "parallax_reverse", "value" => array(__("Reverse Parallax Effect", "js_composer") => "yes"), "dependency" => array('element' => "parallax", 'value' => array('vertical'))), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "class", "description" => ''), array("type" => "textfield", "heading" => __("Section ID (optional)", "js_composer"), "param_name" => "section_id", "description" => '', "dependency" => array('element' => "section", 'not_empty' => true))));
vc_remove_param('vc_row_inner', 'el_class');
//vc_remove_param('vc_row_inner', 'css');
vc_add_params('vc_row_inner', array(array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "class", "description" => '')));
// Change params for Column - vc_column
vc_remove_param('vc_column', 'el_class');
//vc_remove_param('vc_column', 'css');
vc_remove_param('vc_column', 'width');
vc_remove_param('vc_column', 'offset');
vc_add_params('vc_column', array($add_css_animation));
vc_remove_param('vc_column_inner', 'el_class');
//vc_remove_param('vc_column_inner', 'css');
vc_remove_param('vc_column_inner', 'width');
vc_add_params('vc_column_inner', array($add_css_animation));
/* Single image */
vc_map(array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Single image with CSS animation', 'js_composer'), "params" => array(array("type" => "attach_image", "heading" => __("Image", "js_composer"), "param_name" => "image", "value" => "", "description" => __("Select image from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Default', "js_composer") => "", __('Align left', "js_composer") => "left", __('Align center', "js_composer") => "center", __('Align right', "js_composer") => "right"), "description" => ''), $add_css_animation, array("type" => "dropdown", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "value" => array(__("Full Size", "js_composer") => "full", __("Thumbnail", "js_composer") => "thumbnail", __("Medium", "js_composer") => "medium"), "description" => ''), array("type" => 'checkbox', "heading" => __("Open original image in a lightbox on click", "js_composer"), "param_name" => "img_link_large", "description" => "", "value" => array(__("Yes, please", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Image link", "js_composer"), "param_name" => "img_link", "description" => __("Enter url if you want this image to have link.", "js_composer"), "dependency" => array('element' => "img_link_large", 'is_empty' => true)), array('type' => 'checkbox', 'heading' => __('Open this link in a new tab (window)', 'js_composer'), 'param_name' => 'img_link_new_tab', 'value' => array(__('Yes, please', 'js_composer') => true), "dependency" => array('element' => "img_link", 'not_empty' => true)), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
/* Gallery/Slideshow
---------------------------------------------------------- */
vc_map(array('name' => __('Image Gallery', 'js_composer'), 'base' => 'vc_gallery', 'icon' => 'icon-wpb-images-stack', 'category' => __('Content', 'js_composer'), 'description' => __('Responsive image gallery', 'js_composer'), "params" => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Gallery Type", "js_composer"), "param_name" => "type", "value" => array(__("Small size thumbs", "js_composer") => "s", __("Tiny size thumbs", "js_composer") => "xs", __("Medium size thumbs", "js_composer") => "m", __("Large size thumbs", "js_composer") => "l", __("Masonry grid", "js_composer") => "masonry"), "description" => ''))));
/* Slideshow
---------------------------------------------------------- */
vc_map(array("name" => __("Image Slider", "js_composer"), "base" => "vc_simple_slider", "icon" => "icon-wpb-images-stack", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Auto Rotation", "js_composer"), "param_name" => "type", "value" => array(__("Yes", "js_composer") => "1", __("No", "js_composer") => "0"), "description" => ''))));
/* Separator (Divider)
---------------------------------------------------------- */
vc_map(array('name' => __('Separator', 'js_composer'), 'base' => 'vc_separator', 'icon' => 'icon-wpb-ui-separator', 'category' => __('Content', 'js_composer'), 'description' => __('Horizontal separator line', 'js_composer'), "params" => array(array("type" => "dropdown", "heading" => __("Separator Type", "js_composer"), "param_name" => "type", "value" => array(__('Full Width', "js_composer") => "", __('Short', "js_composer") => "short", __('Invisible', "js_composer") => "invisible"), "description" => ''), array("type" => "dropdown", "heading" => __("Separator Size", "js_composer"), "param_name" => "size", "value" => array(__('Medium', "js_composer") => "", __('Big', "js_composer") => "big", __('Small', "js_composer") => "small"), "description" => ''), array("type" => "textfield", "heading" => __("Icon", "js_composer"), "param_name" => "icon", "value" => "star", "description" => sprintf(__('FontAwesome Icon name. %s', "js_composer"), '<a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">Full list of icons</a>')))));
/* Button
---------------------------------------------------------- */
vc_map(array("name" => __("Button", "js_composer"), "base" => "vc_button", "icon" => "icon-wpb-ui-button", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Button Label", "js_composer"), "holder" => "button", "class" => "wpb_button", "param_name" => "text", "value" => __("Click me", "js_composer"), "description" => __("This is the text that appears on your button", "js_composer")), array("type" => "textfield", "heading" => __("Button Link", "js_composer"), "param_name" => "url", "description" => __("Add the button\\'s url eg http://example.com", "js_composer")), array("type" => "textfield", "heading" => __("Button Icon (optional)", "js_composer"), "param_name" => "icon", "description" => sprintf(__('FontAwesome Icon name. %s', "js_composer"), '<a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">Full list of icons</a>')), array("type" => "dropdown", "heading" => __("Button Position", "js_composer"), "param_name" => "align", "value" => array(__('Align left', "js_composer") => "left", __('Align center', "js_composer") => "center", __('Align right', "js_composer") => "right"), "description" => ''), array("type" => "dropdown", "heading" => __("Button Color", "js_composer"), "param_name" => "type", "value" => array(__("Default (theme color)", "js_composer") => "default", __("Primary (theme color)", "js_composer") => "primary", __("Secondary (theme color)", "js_composer") => "secondary", __("Outlined with Transparent Background", "js_composer") => "outline", __("Pink", "js_composer") => "pink", __("Blue", "js_composer") => "blue", __("Green", "js_composer") => "green", __("Yellow", "js_composer") => "yellow", __("Purple", "js_composer") => "purple", __("Red", "js_composer") => "red", __("Lime", "js_composer") => "lime", __("Navy", "js_composer") => "navy", __("Cream", "js_composer") => "cream", __("Brown", "js_composer") => "brown", __("Midnight", "js_composer") => "midnight", __("Teal", "js_composer") => "teal"), "description" => ''), array("type" => "dropdown", "heading" => __("Button Size", "js_composer"), "param_name" => "size", "value" => array(__("Normal", "js_composer") => "", __("Small", "js_composer") => "small", __("Big", "js_composer") => "big"), "description" => ''), array("type" => "dropdown", "heading" => __("Button Link Target", "js_composer"), "param_name" => "target", "value" => $target_arr, "dependency" => array('element' => "href", 'not_empty' => true))), "js_view" => 'VcButtonView'));
/* Tabs
コード例 #17
0
vc_remove_param('vc_row', 'el_class');
vc_remove_param('vc_row', 'css');
vc_add_params('vc_row', array(array("type" => "checkbox", "heading" => __("Separate Section", "js_composer"), "param_name" => "section", "value" => array(__("Place this row into a separate section", "js_composer") => "yes"), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => 'checkbox', "heading" => __("Boxed Columns", "js_composer"), "param_name" => "boxed_columns", "description" => "", "value" => array(__("Enable boxed columns", "js_composer") => 'yes'), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Section Color Style", "js_composer"), "param_name" => "background", "value" => array(__('Content bg color | Content text color', "js_composer") => "", __('Alternate bg color | Content text color', "js_composer") => "alternate", __('Primary bg color | White text color', "js_composer") => "primary", __('Secondary bg color | White text color', "js_composer") => "secondary", __('Custom colors', "js_composer") => "custom"), "description" => __("The section will use the color scheme you select. Color schemes are defined at Styling tab of the Theme Options", "js_composer"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Background Color"), "param_name" => "bg_color", "description" => '', "dependency" => array('element' => "background", 'value' => 'custom')), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "description" => '', "dependency" => array('element' => "background", 'value' => 'custom')), array("type" => "checkbox", "heading" => __("Full Width Content", "js_composer"), "param_name" => "full_width", "value" => array(__("Stretch content to the full width", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "checkbox", "heading" => __("Full Height Content", "js_composer"), "param_name" => "full_height", "value" => array(__("Remove vertical indents", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "attach_image", "heading" => __("Section Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Parallax Effect", "js_composer"), "param_name" => "parallax", "value" => array(__("None", "js_composer") => "", __("Vertical Parallax", "js_composer") => "vertical", __("Horizontal Parallax", "js_composer") => "horizontal", __('Still (Image not moves)', "js_composer") => "still"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "checkbox", "heading" => __("Background Video", "js_composer"), "param_name" => "video", "value" => array(__("Apply Background Video to this section", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "textfield", "heading" => __("MP4 video file", "js_composer"), "param_name" => "video_mp4", "description" => __("Add link to MP4 video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("OGV video file", "js_composer"), "param_name" => "video_ogg", "description" => __("Add link to OGV video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("WebM video file", "js_composer"), "param_name" => "video_webm", "description" => __("Add link to WebM video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Overlay Color"), "param_name" => "overlay_color", "value" => '', "description" => '', "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "textfield", "heading" => __("Row/Section ID", "js_composer"), "param_name" => "section_id", "description" => ''), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "class", "description" => '')));
vc_remove_param('vc_row_inner', 'el_class');
vc_remove_param('vc_row_inner', 'css');
vc_add_params('vc_row_inner', array(array("type" => 'checkbox', "heading" => __("Boxed Columns", "js_composer"), "param_name" => "boxed_columns", "description" => "", "value" => array(__("Enable boxed columns", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Row ID", "js_composer"), "param_name" => "section_id", "description" => ''), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "class", "description" => '')));
// Change params for Column - vc_column
vc_remove_param('vc_column', 'el_class');
vc_remove_param('vc_column', 'css');
vc_remove_param('vc_column', 'width');
vc_remove_param('vc_column', 'offset');
vc_add_params('vc_column', array($add_css_animation, $add_css_animation_delay, array("type" => "colorpicker", "class" => "", "heading" => __("Background Color"), "param_name" => "bg_color", "value" => '', "description" => ''), array("type" => "colorpicker", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "value" => '', "description" => ''), array("type" => "attach_image", "heading" => __("Section Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer"))));
vc_remove_param('vc_column_inner', 'el_class');
vc_remove_param('vc_column_inner', 'css');
vc_remove_param('vc_column_inner', 'width');
vc_add_params('vc_column_inner', array($add_css_animation, $add_css_animation_delay, array("type" => "colorpicker", "class" => "", "heading" => __("Background Color"), "param_name" => "bg_color", "value" => '', "description" => ''), array("type" => "colorpicker", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "value" => '', "description" => ''), array("type" => "attach_image", "heading" => __("Section Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer"))));
/* Single image */
vc_map(array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Single image with CSS animation', 'js_composer'), 'params' => array(array("type" => "attach_image", "heading" => __("Image", "js_composer"), "param_name" => "image", "value" => "", "description" => __("Select image from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Image Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Default', "js_composer") => "", __('Left', "js_composer") => "left", __('Center', "js_composer") => "center", __('Right', "js_composer") => "right"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Image Size", "js_composer"), "param_name" => "img_size", "value" => array(__("Full Size", "js_composer") => "full", __("Thumbnail", "js_composer") => "thumbnail", __("Medium", "js_composer") => "medium"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => 'checkbox', "heading" => '', "param_name" => "img_link_large", "description" => "", "value" => array(__("Enable lightbox with the original image on click", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Image link", "js_composer"), "param_name" => "img_link", "description" => __("Enter url if you want this image to have link.", "js_composer"), "dependency" => array('element' => "img_link_large", 'is_empty' => true)), array('type' => 'checkbox', 'heading' => '', 'param_name' => 'img_link_new_tab', 'value' => array(__('Open this link in a new tab', 'js_composer') => true), "dependency" => array('element' => "img_link", 'not_empty' => true)), $add_css_animation, $add_css_animation_delay)));
/* Image Gallery
---------------------------------------------------------- */
vc_map(array('name' => __('Image Gallery', 'js_composer'), 'base' => 'vc_gallery', 'icon' => 'icon-wpb-images-stack', 'category' => __('Content', 'js_composer'), 'description' => __('Responsive image gallery', 'js_composer'), 'params' => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Columns", "js_composer"), "param_name" => "columns", "value" => array('1 column' => '1', '2 columns' => '2', '3 columns' => '3', '4 columns' => '4', '5 columns' => '5', '6 columns' => '6', '7 columns' => '7', '8 columns' => '8', '9 columns' => '9', '10 columns' => '10'), "description" => ''), array("type" => 'checkbox', "heading" => __("Masonry Grid", "js_composer"), "param_name" => "masonry", "description" => "", "value" => array(__("Display thumbs with the initial proportions", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => __("Indents", "js_composer"), "param_name" => "indents", "description" => "", "value" => array(__("Add indents between thumbnails", "js_composer") => 'yes')))));
/* Image Slider
---------------------------------------------------------- */
vc_map(array("name" => __("Image Slider", "js_composer"), "base" => "vc_simple_slider", "icon" => "icon-wpb-images-stack", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Navigation Arrows", "js_composer"), "param_name" => "arrows", "value" => array(__("Show always", "js_composer") => "always", __("Show on hover", "js_composer") => "hover", __("Hide", "js_composer") => "hide"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => "dropdown", "heading" => __("Additional Navigation", "js_composer"), "param_name" => "nav", "value" => array(__("None", "js_composer") => "none", __("Dots", "js_composer") => "dots", __("Thumbs", "js_composer") => "thumbs"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => "dropdown", "heading" => __("Transition Effect", "js_composer"), "param_name" => "transition", "value" => array(__("Slide", "js_composer") => "slide", __("Fade", "js_composer") => "fade", __("Dissolve", "js_composer") => "dissolve"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => 'checkbox', "heading" => '', "param_name" => "auto_rotation", "value" => array(__("Enable Auto Rotation", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => '', "param_name" => "fullscreen", "value" => array(__("Allow Full Screen view", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => '', "param_name" => "stretch", "value" => array(__("Stretch all images to full size of this slider", "js_composer") => 'yes')))));
/* Separator (Divider)
---------------------------------------------------------- */
vc_map(array('name' => __('Separator', 'js_composer'), 'base' => 'vc_separator', 'icon' => 'icon-wpb-ui-separator', 'category' => __('Content', 'js_composer'), 'description' => __('Horizontal separator line', 'js_composer'), 'params' => array(array("type" => "dropdown", "heading" => __("Separator Type", "js_composer"), "param_name" => "type", "value" => array(__('Default', "js_composer") => "", __('Full Width', "js_composer") => "fullwidth", __('Short', "js_composer") => "short", __('Invisible', "js_composer") => "invisible"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Separator Size", "js_composer"), "param_name" => "size", "value" => array(__('Medium', "js_composer") => "", __('Small', "js_composer") => "small", __('Large', "js_composer") => "big", __('Huge', "js_composer") => "huge"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Icon (optional)", "js_composer"), "param_name" => "icon", "value" => "", "description" => sprintf('<a href="http://fontawesome.io/icons/" target="_blank">FontAwesome</a> or <a href="http://designjockey.github.io/material-design-fonticons/" target="_blank">Material Design</a> icons'), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Text (optional)", "js_composer"), "param_name" => "text", "value" => "", "description" => __("Displays text in the middle of this separator", "js_composer"), "edit_field_class" => "vc_col-sm-6 vc_column"))));
/* Button
---------------------------------------------------------- */
vc_map(array("name" => __("Button", "js_composer"), "base" => "vc_button", "icon" => "icon-wpb-ui-button", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Button Label", "js_composer"), "holder" => "button", "class" => "wpb_button", "param_name" => "text", "value" => __("Click Me", "js_composer"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Button Link", "js_composer"), "param_name" => "url", "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Color", "js_composer"), "param_name" => "color", "value" => array(__("Primary (theme color)", "js_composer") => "primary", __("Secondary (theme color)", "js_composer") => "secondary", __("Light (theme color)", "js_composer") => "light", __("Contrast (theme color)", "js_composer") => "contrast", __("Black", "js_composer") => "black", __("White", "js_composer") => "white"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Type", "js_composer"), "param_name" => "type", "value" => array(__("Raised", "js_composer") => "raised", __("Flat", "js_composer") => "flat"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Button Icon (optional)", "js_composer"), "param_name" => "icon", "description" => sprintf('<a href="http://fontawesome.io/icons/" target="_blank">FontAwesome</a> or <a href="http://designjockey.github.io/material-design-fonticons/" target="_blank">Material Design</a> icons')), array("type" => "dropdown", "heading" => __("Icon Position", "js_composer"), "param_name" => "iconpos", "value" => array(__("Left", "js_composer") => "", __("Right", "js_composer") => "right"), "description" => '', "dependency" => array('element' => "icon", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Button Size", "js_composer"), "param_name" => "size", "value" => array(__("Medium", "js_composer") => "", __("Large", "js_composer") => "big"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Left', "js_composer") => "left", __('Center', "js_composer") => "center", __('Right', "js_composer") => "right"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "checkbox", "heading" => '', "param_name" => "external", "value" => array(__('Open button link in a new tab', 'js_composer') => true), "dependency" => array('element' => "href", 'not_empty' => true))), "js_view" => 'VcButtonView'));
/* Tabs
コード例 #18
0
ファイル: column.php プロジェクト: novichkovv/prlab
<?php

$advanced_tab = __('Advanced Design Options', 'tm-polygon');
vc_add_params('vc_column', array(array('group' => $advanced_tab, 'type' => 'textfield', 'heading' => "Reveal", 'param_name' => 'reveal', 'description' => __('Enter <a target="_blank" href="https://github.com/jlmakes/scrollReveal.js/wiki/Keywords">Keyword of ScrollReveal</a>', 'tm-polygon')), array('group' => $advanced_tab, 'type' => 'colorpicker', 'heading' => "Background color for hover state", 'param_name' => 'background_color', 'description' => __('Choose an color for background. Leave blank for none.', 'tm-polygon')), array('group' => $advanced_tab, 'type' => 'attach_image', 'heading' => "Background image for hover state", 'param_name' => 'background_image', 'description' => __('Choose an image for background. Leave blank for none.', 'tm-polygon'))));
vc_add_params('vc_column_inner', array(array('group' => $advanced_tab, 'type' => 'textfield', 'heading' => "Reveal", 'param_name' => 'reveal', 'description' => __('Enter <a target="_blank" href="https://github.com/jlmakes/scrollReveal.js/wiki/Keywords">Keyword of ScrollReveal</a>', 'tm-polygon'))));
コード例 #19
0
ファイル: js_composer.php プロジェクト: BersnardC/DROPINN
vc_map(array("name" => __("Slider", 'trav'), "base" => "slider", "icon" => "slider", "class" => "", "category" => __('by SoapTheme', 'trav'), 'as_parent' => array('only' => 'slide'), "params" => array(array('type' => 'dropdown', 'heading' => __('Slider Type', 'trav'), 'param_name' => 'type', 'value' => array(__('Gallery1', 'trav') => 'gallery1', __('Gallery2', 'trav') => 'gallery2', __('Gallery3', 'trav') => 'gallery3', __('Gallery4', 'trav') => 'gallery4', __('carousel1', 'trav') => 'carousel1', __('carousel2', 'trav') => 'carousel2', __('carousel3', 'trav') => 'carousel'), 'std' => 'gallery2', 'description' => ""), $ul_class, $extra_class), 'default_content' => '[slide][/slide]', 'js_view' => 'VcColumnView'));
vc_map(array("name" => __("Slide", 'trav'), "base" => "slide", "icon" => "slide", "class" => "", "category" => __('by SoapTheme', 'trav'), "allowed_container_element" => 'slider', 'as_child' => array('only' => 'slider'), "params" => array($content_area, $extra_class)));
/* bgslider Shortcode */
vc_map(array("name" => __("Background Slider", 'trav'), "base" => "bgslider", "icon" => "bgslider", "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array(array('type' => 'dropdown', 'heading' => __('Full Screen', 'trav'), 'param_name' => 'full_screen', 'value' => array(__('Yes', 'trav') => 'yes', __('No', 'trav') => 'no'), 'std' => 'yes', 'description' => ""), array("type" => "textfield", "class" => "", 'heading' => __('Image Urls', 'trav'), "description" => __("Fill this field with Image Urls separated by commas. ", "trav"), "param_name" => "img_urls"), $content_area, $ul_class, $extra_class)));
/* imageframe Shortcode */
vc_map(array("name" => __("Image Frame", 'trav'), "base" => "imageframe", "icon" => "imageframe", "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array(array('type' => 'textfield', 'heading' => __('Title', 'trav'), 'param_name' => 'title'), array('type' => 'textfield', 'heading' => __('Image Url', 'trav'), 'param_name' => 'src', 'admin_label' => true), array("type" => "textfield", "heading" => __("Link", 'trav'), "param_name" => "link", "value" => "#", "description" => "You can fill 'no' if you do not need link."), array("type" => "dropdown", "heading" => __("Hover Effect", 'trav'), "param_name" => "hover", "value" => array(__("No Effect", "trav") => "", __("Default Effect", "trav") => "hover-effect", __("Yellow Effect", "trav") => "hover-effect yellow"), "std" => ''), array("type" => "textfield", "heading" => __("Width", 'trav'), "param_name" => "width", "value" => ""), array("type" => "textfield", "heading" => __("Height", 'trav'), "param_name" => "height", "value" => ""), array("type" => "textfield", "heading" => __("Label", 'trav'), "param_name" => "label", "value" => ""), array("type" => "textfield", "heading" => __("Label Content", 'trav'), "param_name" => "label_content", "value" => ""), array("type" => "checkbox", "heading" => __("Image Centerize", 'trav'), "param_name" => "position", "value" => array(__("Yes", "trav") => "middle"), "std" => ''), $content_area, $extra_class)));
vc_add_params("imageframe", $add_css3_animation);
/* content_boxes Shortcode */
vc_map(array("name" => __("Content Box Wrapper", 'trav'), "base" => "content_boxes", "icon" => "content_boxes", "is_container" => true, "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array(array("type" => "dropdown", "heading" => __("Style", 'trav'), "param_name" => "style", "admin_label" => true, "value" => array(__("Style 1", 'trav') => "style1", __("Style 2", 'trav') => "style2", __("Style 3", 'trav') => "style3", __("Style 4", 'trav') => "style4", __("Style 5", 'trav') => "style5", __("Style 6", 'trav') => "style6", __("Style 7", 'trav') => "style7", __("Style 8", 'trav') => "style8", __("Style 9", 'trav') => "style9", __("Style 10", 'trav') => "style10", __("Style 11", 'trav') => "style11", __("Style 12", 'trav') => "style12"), "std" => ''), $extra_class), 'js_view' => 'VcColumnView'));
/* content_box Shortcode */
vc_map(array("name" => __("Content Box", 'trav'), "base" => "content_box", "icon" => "content_box", "class" => "", "as_parent" => array('only' => 'imageframe, content_box_detail'), "category" => __('by SoapTheme', 'trav'), "params" => array($extra_class), 'js_view' => 'VcColumnView'));
/* content_box_detail Shortcode */
vc_map(array("name" => __("Content Box Detail", 'trav'), "base" => "content_box_detail", "icon" => "content_box_detail", "class" => "", "as_child" => array('only' => 'content_box'), "category" => __('by SoapTheme', 'trav'), "params" => array($content_area, $extra_class)));
/* promo_box Shortcode */
vc_map(array("name" => __("Promotion Box", 'trav'), "base" => "promo_box", "icon" => "promo_box", "class" => "", "as_parent" => array('only' => 'promo_box_left, promo_box_right'), "category" => __('by SoapTheme', 'trav'), "params" => array(array("type" => "dropdown", "heading" => __("Type", 'trav'), "param_name" => "type", "admin_label" => true, "value" => array(__("Type 1", 'trav') => "type1", __("Type 2", 'trav') => "type2"), "std" => ''), array("type" => "attach_image", "heading" => __("Main Image", 'trav'), "param_name" => "img_id", "value" => ""), array("type" => "dropdown", "heading" => __("Image Section Width", 'trav'), "param_name" => "img_section_width", "value" => array(__("2 columns - 1/6", 'trav') => "2", __("3 columns - 1/4", 'trav') => "3", __("4 columns - 1/3", 'trav') => "4", __("5 columns - 5/12", 'trav') => "5", __("6 columns - 1/2", 'trav') => "6", __("7 columns - 7/12", 'trav') => "7", __("8 columns - 2/3", 'trav') => "8", __("9 columns - 3/4", 'trav') => "9", __("10 columns - 5/6", 'trav') => "10"), 'description' => __('You can change image section width.', 'trav'), "std" => '4'), $extra_class), 'js_view' => 'VcColumnView'));
vc_add_params("promo_box", $add_css3_animation);
vc_map(array("name" => __("Promo Box Left", 'trav'), "base" => "promo_box_left", "icon" => "promo_box_left", 'as_child' => array('only' => 'promo_box'), "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array($content_area, $extra_class)));
vc_map(array("name" => __("Promo Box Right", 'trav'), "base" => "promo_box_right", "icon" => "promo_box_right", 'as_child' => array('only' => 'promo_box'), "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array($content_area, $extra_class)));
vc_map(array("name" => __("Search Form", 'trav'), "base" => "search_form", "icon" => "search_form", "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Post Type", 'trav'), "param_name" => "post_type", 'value' => array(__('Accommodation', 'trav') => 'accommodation', __('Tour', 'trav') => 'tour', __('Post', 'trav') => 'post'), "std" => "post", "description" => "Post type you are going to use search form for."), array("type" => "dropdown", "class" => "", "heading" => __("Style", 'trav'), "param_name" => "style", 'value' => array(__('Style 1', 'trav') => 'style1', __('Style 2', 'trav') => 'style2', __('Style 3', 'trav') => 'style3'), "std" => "post", "description" => "Post type you are going to use search form for."), $content_area, $extra_class)));
/* Animation Shortcode */
vc_map(array("name" => __("CSS3 Animation", 'trav'), "base" => "animation", "icon" => "animation", "class" => "", "controls" => "full", "category" => __('by SoapTheme', 'trav'), "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Animation Type", 'trav'), "admin_label" => true, "param_name" => "type", "value" => "", "description" => "Input the type of animation if you want this element to be animated when it enters into the browsers viewport. Please see css/animate.css for the animation types. <br />Note: Works only in modern browsers."), array("type" => "textfield", "class" => "", "heading" => __("Animation Duration", 'trav'), "admin_label" => true, "param_name" => "duration", "value" => "1", "description" => "Input the duration of animation in seconds.", "dependency" => array("element" => "type", "not_empty" => true)), array("type" => "textfield", "class" => "", "heading" => __("Animation Delay", 'trav'), "admin_label" => true, "param_name" => "delay", "value" => "0", "description" => "Input the delay of animation in seconds.", "dependency" => array("element" => "type", "not_empty" => true))), 'js_view' => 'VcColumnView'));
vc_map(array("name" => __("Team Member", 'trav'), "base" => "team_member", "icon" => "team_member", "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Style", 'trav'), "param_name" => "style", "value" => array(__("Style 1", 'trav') => "style1", __("Style 2", 'trav') => "style2"), "std" => 'style1', "description" => ""), array('type' => 'textfield', 'heading' => __('Name', 'trav'), 'param_name' => 'name', 'admin_label' => true), array('type' => 'textfield', 'heading' => __('Job', 'trav'), 'param_name' => 'job'), array('type' => 'textarea', 'heading' => __('Description', 'trav'), 'param_name' => 'desc'), array('type' => 'attach_image', 'heading' => __('Photo', 'trav'), 'param_name' => 'photo_id'), array("type" => "textarea_html", "heading" => __("Social Links", 'trav'), "param_name" => "content", "description" => __("Insert social links.", 'trav'), 'value' => '[social_links style="style1" linktarget="_blank" facebook="" twitter=""]'))));
/* Pricing Table */
vc_map(array("name" => __("Pricing Table", 'trav'), "base" => "pricing_table_vc", "icon" => "pricing_table_vc", "class" => "", "category" => __('by SoapTheme', 'trav'), "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Title", 'trav'), "admin_label" => true, "param_name" => "title"), array("type" => "textfield", "class" => "", "heading" => __("Sub Title", 'trav'), "admin_label" => true, "param_name" => "sub_title"), array("type" => "textfield", "class" => "", "heading" => __("Icon Class", 'trav'), "param_name" => "icon_class"), array("type" => "textfield", "class" => "", "heading" => __("Price", 'trav'), "admin_label" => true, "param_name" => "price"), array("type" => "textfield", "class" => "", "heading" => __("Interval", 'trav'), "admin_label" => true, "param_name" => "unit_text", "value" => __("Per Month", 'trav')), array("type" => "textarea", "heading" => __("Description", 'trav'), "param_name" => "desc"), array("type" => "dropdown", "class" => "", "heading" => __("Color", 'trav'), "param_name" => "color", "value" => array(__("white", 'trav') => "white", __("yellow", 'trav') => "yellow", __("green", 'trav') => "green", __("blue", 'trav') => "blue", __("red", 'trav') => "red"), "std" => 'white', "description" => ""), $content_area = array("type" => "textarea_html", "heading" => __("Content", 'trav'), "param_name" => "content", "description" => __("Enter your content.", 'trav'), "value" => '<ul class="check-square features"><li>ONLINE BOOKING</li><li>ADVANCED OPTIONS</li></ul>'), array("type" => "textfield", "class" => "", "heading" => __("Button title", 'trav'), "param_name" => "btn_title"), array("type" => "textfield", "class" => "", "heading" => __("Button Url", 'trav'), "param_name" => "btn_url"), array("type" => "textfield", "class" => "", "heading" => __("Button Color", 'trav'), "param_name" => "btn_color"), array("type" => "dropdown", "class" => "", "heading" => __("Target", 'trav'), "param_name" => "btn_target", "value" => array("_self" => "", "_blank" => "_blank", "_top" => "_top", "_parent" => "_parent"), "std" => '', "description" => ""), $extra_class)));
/* Accordion Shortcode */
vc_add_param("vc_accordion", array("type" => "dropdown", "class" => "", "heading" => __("Toggle Type", 'trav'), "admin_label" => true, "param_name" => "toggle_type", "value" => array("Accordion" => "accordion", "Toggle" => "toggle"), "std" => "accordion", "description" => ""));
vc_add_param("vc_accordion", array("type" => "dropdown", "class" => "", "heading" => __("Style", 'trav'), "admin_label" => true, "param_name" => "style", "value" => array(__("Style 1", 'trav') => "style1", __("Style 2", 'trav') => "style2"), "std" => "style1", "description" => ""));
vc_add_param("vc_accordion", array("type" => "dropdown", "class" => "", "heading" => __("Show Image", 'trav'), "param_name" => "with_image", "value" => array(__("Yes", 'trav') => "yes", __("No", 'trav') => "no"), "dependency" => array("element" => "toggle_type", "value" => array("accordion")), "std" => "no", "description" => ""));
vc_add_param("vc_accordion", array("type" => "textfield", "class" => "", "heading" => __("Image Animation Type", 'trav'), "param_name" => "image_animation_type", "value" => 'fadeIn', "description" => "Input the type of animation if you want this element to be animated when it enters into the browsers viewport. Please see css/animate.css for the animation types. <br />Note: Works only in modern browsers.", "dependency" => array("element" => "with_image", "value" => array("yes"))));
vc_add_param("vc_accordion", array("type" => "textfield", "class" => "", "heading" => __("Image Animation Duration", 'trav'), "param_name" => "image_animation_duration", "value" => '1', "dependency" => array("element" => "with_image", "value" => array("yes"))));
vc_remove_param('vc_accordion', 'interval');
コード例 #20
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
//  0 - unsorted and appended to bottom Default
//  1 - Appended to top)
$visibilities_arr = array('vc_empty_space', 'kt_heading');
foreach ($visibilities_arr as $item) {
    vc_add_param($item, array("type" => "dropdown", "heading" => esc_html__("Visibility", 'mondova'), "param_name" => "visibility", "value" => array(esc_html__('Always Visible', 'mondova') => '', esc_html__('Visible on Phones', 'mondova') => 'visible-xs-block', esc_html__('Visible on Tablets', 'mondova') => 'visible-sm-block', esc_html__('Visible on Desktops', 'mondova') => 'visible-md-block', esc_html__('Visible on Desktops Large', 'mondova') => 'visible-lg-block', esc_html__('Hidden on Phones', 'mondova') => 'hidden-xs', esc_html__('Hidden on Tablets', 'mondova') => 'hidden-sm', esc_html__('Hidden on Desktops', 'mondova') => 'hidden-md', esc_html__('Hidden on Desktops Large', 'mondova') => 'hidden-lg'), "admin_label" => true));
}
vc_add_params("vc_custom_heading", array(array("type" => "dropdown", "heading" => __("Custom Style", 'wingman'), "param_name" => "custom_style", "value" => array(esc_html__('Default', 'mondova') => '', esc_html__('Style 1', 'mondova') => '1', esc_html__('Style 2', 'mondova') => '2'), 'group' => __('Extra', 'js_composer'))));
/*
$composer_addons = array(
    //'dropcap.php',
    'blockquote.php',
    'googlemap.php',
    'socials.php',
    'gallery-grid.php',
    'gallery_fullwidth.php',
    'gallery-justified.php'
);
*/
$composer_addons = array('heading.php', 'banner.php');
if (kt_is_wc()) {
    $composer_wc_addons = array('products_tab.php');
    $composer_addons = array_merge($composer_wc_addons, $composer_addons);
}
foreach ($composer_addons as $addon) {
    require_once KT_FW_DIR . 'js_composer/vc_addons/' . $addon;
コード例 #21
0
ファイル: vc_config.php プロジェクト: ConceptHaus/atra
vc_remove_param('vc_row', 'css');
vc_add_params('vc_row', array(array("type" => 'checkbox', "heading" => __("Boxed Columns", "js_composer"), "param_name" => "boxed_columns", "description" => "", "value" => array(__("Enable boxed columns", "js_composer") => 'yes')), array("type" => "checkbox", "heading" => __("Separate Section", "js_composer"), "param_name" => "section", "value" => array(__("Place this row into a separate section", "js_composer") => "yes")), array("type" => "checkbox", "heading" => __("Full Screen Section", "js_composer"), "param_name" => "full_screen", "value" => array(__("Make this section height equal to the screen height", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "checkbox", "param_name" => "vertical_centering", "value" => array(__("Center content of this section by vertical", "js_composer") => "yes"), "dependency" => array('element' => "full_screen", 'not_empty' => true)), array("type" => "checkbox", "heading" => __("Full Width Content", "js_composer"), "param_name" => "full_width", "value" => array(__("Stretch content to the full width", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "checkbox", "heading" => __("Full Height Content", "js_composer"), "param_name" => "full_height", "value" => array(__("Remove vertical indents", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Section Color Style", "js_composer"), "param_name" => "background", "value" => array(__('Content bg color | Content text color', "js_composer") => "", __('Alternate bg color | Content text color', "js_composer") => "alternate", __('Primary bg color | White text color', "js_composer") => "primary", __('Secondary bg color | White text color', "js_composer") => "secondary", __('Custom colors', "js_composer") => "custom"), "description" => __("The section will use the color scheme you select. Color schemes are defined at Styling tab of the Theme Options", "js_composer"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Background Color"), "param_name" => "bg_color", "description" => '', "dependency" => array('element' => "background", 'value' => 'custom')), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "description" => '', "dependency" => array('element' => "background", 'value' => 'custom')), array("type" => "attach_image", "heading" => __("Section Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Parallax Effect", "js_composer"), "param_name" => "parallax", "value" => array(__("None", "js_composer") => "", __("Vertical Parallax", "js_composer") => "vertical", __("Horizontal Parallax", "js_composer") => "horizontal", __('Still (Image not moves)', "js_composer") => "still"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "checkbox", "heading" => __("Background Video", "js_composer"), "param_name" => "video", "value" => array(__("Apply Background Video to this section", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "textfield", "heading" => __("MP4 video file", "js_composer"), "param_name" => "video_mp4", "description" => __("Add link to MP4 video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("OGV video file", "js_composer"), "param_name" => "video_ogg", "description" => __("Add link to OGV video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("WebM video file", "js_composer"), "param_name" => "video_webm", "description" => __("Add link to WebM video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("Row/Section ID", "js_composer"), "param_name" => "section_id", "description" => ''), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
vc_remove_param('vc_row_inner', 'el_class');
vc_remove_param('vc_row_inner', 'el_id');
vc_remove_param('vc_row_inner', 'css');
vc_add_params('vc_row_inner', array(array("type" => 'checkbox', "heading" => __("Boxed Columns", "js_composer"), "param_name" => "boxed_columns", "description" => "", "value" => array(__("Enable boxed columns", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Row ID", "js_composer"), "param_name" => "section_id", "description" => ''), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
// Change params for Column - vc_column
vc_remove_param('vc_column', 'el_class');
vc_remove_param('vc_column', 'css');
vc_remove_param('vc_column', 'width');
vc_remove_param('vc_column', 'offset');
vc_add_params('vc_column', array($add_css_animation, $add_css_animation_delay, array("type" => "colorpicker", "class" => "", "heading" => __("Background Color"), "param_name" => "bg_color", "value" => '', "description" => ''), array("type" => "colorpicker", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "value" => '', "description" => ''), array("type" => "attach_image", "heading" => __("Column Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer")), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
vc_remove_param('vc_column_inner', 'el_class');
vc_remove_param('vc_column_inner', 'css');
vc_remove_param('vc_column_inner', 'width');
vc_add_params('vc_column_inner', array($add_css_animation, $add_css_animation_delay, array("type" => "colorpicker", "class" => "", "heading" => __("Background Color"), "param_name" => "bg_color", "value" => '', "description" => ''), array("type" => "colorpicker", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "value" => '', "description" => ''), array("type" => "attach_image", "heading" => __("Column Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => __("Leave empty if you don't want to use the background image", "js_composer")), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
/* Single image */
vc_map(array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Single image with CSS animation', 'js_composer'), 'params' => array(array("type" => "attach_image", "heading" => __("Image", "js_composer"), "param_name" => "image", "value" => "", "description" => __("Select image from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Image Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Default', "js_composer") => "", __('Left', "js_composer") => "left", __('Center', "js_composer") => "center", __('Right', "js_composer") => "right"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Image Size", "js_composer"), "param_name" => "img_size", "value" => array(__("Full Size", "js_composer") => "full", __("Large (set in Media Settings)", "js_composer") => "large", __("Medium (set in Media Settings)", "js_composer") => "medium", __("Thumbnail (set in Media Settings)", "js_composer") => "thumbnail"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => 'checkbox', "heading" => '', "param_name" => "img_link_large", "description" => "", "value" => array(__("Enable lightbox with the original image on click", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Image link", "js_composer"), "param_name" => "img_link", "description" => __("Enter URL if you want this image to have a link.", "js_composer"), "dependency" => array('element' => "img_link_large", 'is_empty' => true)), array('type' => 'checkbox', 'heading' => '', 'param_name' => 'img_link_new_tab', 'value' => array(__('Open this link in a new tab', 'js_composer') => true), "dependency" => array('element' => "img_link", 'not_empty' => true)), $add_css_animation, $add_css_animation_delay, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
/* Image Gallery
---------------------------------------------------------- */
vc_map(array('name' => __('Image Gallery', 'js_composer'), 'base' => 'vc_gallery', 'icon' => 'icon-wpb-images-stack', 'category' => __('Content', 'js_composer'), 'description' => __('Responsive image gallery', 'js_composer'), 'params' => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Columns", "js_composer"), "param_name" => "columns", "value" => array('1 column' => '1', '2 columns' => '2', '3 columns' => '3', '4 columns' => '4', '5 columns' => '5', '6 columns' => '6', '7 columns' => '7', '8 columns' => '8', '9 columns' => '9', '10 columns' => '10'), "description" => ''), array("type" => 'checkbox', "heading" => __("Masonry Grid", "js_composer"), "param_name" => "masonry", "description" => "", "value" => array(__("Display thumbs with the initial proportions", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => __("Indents", "js_composer"), "param_name" => "indents", "description" => "", "value" => array(__("Add indents between thumbnails", "js_composer") => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Image Slider
---------------------------------------------------------- */
vc_map(array("name" => __("Image Slider", "js_composer"), "base" => "vc_simple_slider", "icon" => "icon-wpb-images-stack", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Navigation Arrows", "js_composer"), "param_name" => "arrows", "value" => array(__("Show always", "js_composer") => "always", __("Show on hover", "js_composer") => "hover", __("Hide", "js_composer") => "hide"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => "dropdown", "heading" => __("Additional Navigation", "js_composer"), "param_name" => "nav", "value" => array(__("None", "js_composer") => "none", __("Dots", "js_composer") => "dots", __("Thumbs", "js_composer") => "thumbs"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => "dropdown", "heading" => __("Transition Effect", "js_composer"), "param_name" => "transition", "value" => array(__("Slide", "js_composer") => "slide", __("Fade", "js_composer") => "fade", __("Dissolve", "js_composer") => "dissolve"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => 'checkbox', "heading" => '', "param_name" => "auto_rotation", "value" => array(__("Enable Auto Rotation", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => '', "param_name" => "fullscreen", "value" => array(__("Allow Full Screen view", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => '', "param_name" => "stretch", "value" => array(__("Stretch all images to full size of this slider", "js_composer") => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Separator (Divider)
---------------------------------------------------------- */
vc_map(array('name' => __('Separator', 'js_composer'), 'base' => 'vc_separator', 'icon' => 'icon-wpb-ui-separator', 'category' => __('Content', 'js_composer'), 'description' => __('Horizontal separator line', 'js_composer'), 'params' => array(array("type" => "dropdown", "heading" => __("Separator Type", "js_composer"), "param_name" => "type", "value" => array(__('Default', "js_composer") => "", __('Full Width', "js_composer") => "fullwidth", __('Short', "js_composer") => "short", __('Invisible', "js_composer") => "invisible"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Separator Size", "js_composer"), "param_name" => "size", "value" => array(__('Medium', "js_composer") => "", __('Small', "js_composer") => "small", __('Large', "js_composer") => "big", __('Huge', "js_composer") => "huge"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Icon (optional)", "js_composer"), "param_name" => "icon", "value" => "", "description" => sprintf('<a href="http://fontawesome.io/icons/" target="_blank">FontAwesome</a> or <a href="http://designjockey.github.io/material-design-fonticons/" target="_blank">Material Design</a> icons'), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Text (optional)", "js_composer"), "param_name" => "text", "value" => "", "description" => __("Displays text in the middle of this separator", "js_composer"), "edit_field_class" => "vc_col-sm-6 vc_column"), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Button
---------------------------------------------------------- */
vc_map(array("name" => __("Button", "js_composer"), "base" => "vc_button", "icon" => "icon-wpb-ui-button", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Button Label", "js_composer"), "holder" => "button", "class" => "wpb_button", "param_name" => "text", "value" => __("Click Me", "js_composer"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Button Link", "js_composer"), "param_name" => "url", "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Color", "js_composer"), "param_name" => "color", "value" => array(__("Primary (theme color)", "js_composer") => "primary", __("Secondary (theme color)", "js_composer") => "secondary", __("Light (theme color)", "js_composer") => "light", __("Contrast (theme color)", "js_composer") => "contrast", __("Black", "js_composer") => "black", __("White", "js_composer") => "white"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Type", "js_composer"), "param_name" => "type", "value" => array(__("Raised", "js_composer") => "raised", __("Flat", "js_composer") => "flat"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Button Icon (optional)", "js_composer"), "param_name" => "icon", "description" => sprintf('<a href="http://fontawesome.io/icons/" target="_blank">FontAwesome</a> or <a href="http://designjockey.github.io/material-design-fonticons/" target="_blank">Material Design</a> icons')), array("type" => "dropdown", "heading" => __("Icon Position", "js_composer"), "param_name" => "iconpos", "value" => array(__("Left", "js_composer") => "", __("Right", "js_composer") => "right"), "description" => '', "dependency" => array('element' => "icon", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Button Size", "js_composer"), "param_name" => "size", "value" => array(__("Medium", "js_composer") => "", __("Large", "js_composer") => "big"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Left', "js_composer") => "left", __('Center', "js_composer") => "center", __('Right', "js_composer") => "right"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "checkbox", "heading" => '', "param_name" => "external", "value" => array(__('Open button link in a new tab', 'js_composer') => true), "dependency" => array('element' => "href", 'not_empty' => true)), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), "js_view" => 'VcButtonView'));
/* Tabs
コード例 #22
0
ファイル: vc.php プロジェクト: narendra-addweb/m1
 /**
  * Customize some Visual Composer default shortcodes
  *
  * Also, this function could be defined in theme "core" plugin.
  */
 function appica_vc_after_init()
 {
     /*
      * frequently used values
      */
     $show_hide_value = array(__('Show', 'appica') => 'show', __('Hide', 'appica') => 'hide');
     $left_right_value = array(__('Left', 'appica') => 'left', __('Right', 'appica') => 'right');
     $enable_disable_value = array(__('Enable', 'appica') => 'enable', __('Disable', 'appica') => 'disable');
     /**
      * @var array Value for yes/no dropdown
      */
     $value_yes_no = array(__('Yes', 'appica') => 'yes', __('No', 'appica') => 'no');
     /**
      * @var string Icon heading name
      */
     $heading_icon = __('Icon', 'appica');
     /**
      * @var array Field "Icon Library" allow choosing different icons
      */
     $field_icon_library = array('type' => 'dropdown', 'param_name' => 'icon_lib', 'heading' => __('Icon library', 'appica'), 'std' => 'fontawesome', 'value' => array('Font Awesome' => 'fontawesome', 'Open Iconic' => 'openiconic', 'Typicons' => 'typicons', 'Entypo' => 'entypo', 'Linecons' => 'linecons', 'Flaticons' => 'flaticons'));
     /**
      * @var array Icon from Font Awesome pack. Depends on {@see $field_icon_library}
      */
     $field_icon_fontawesome = array('type' => 'iconpicker', 'param_name' => 'icon_fontawesome', 'heading' => $heading_icon, 'settings' => array('emptyIcon' => true, 'iconsPerPage' => 200), 'dependency' => array('element' => 'icon_lib', 'value' => 'fontawesome'));
     /**
      * @var array Icon from Openiconic pack. Depends on {@see $field_icon_library}
      */
     $field_icon_openiconic = array('type' => 'iconpicker', 'param_name' => 'icon_openiconic', 'heading' => $heading_icon, 'settings' => array('type' => 'openiconic', 'emptyIcon' => true, 'iconsPerPage' => 200), 'dependency' => array('element' => 'icon_lib', 'value' => 'openiconic'));
     /**
      * @var array Icon from Typicons pack. Depends on {@see $field_icon_library}
      */
     $field_icon_typicons = array('type' => 'iconpicker', 'param_name' => 'icon_typicons', 'heading' => $heading_icon, 'settings' => array('type' => 'typicons', 'emptyIcon' => true, 'iconsPerPage' => 200), 'dependency' => array('element' => 'icon_lib', 'value' => 'typicons'));
     /**
      * @var array Icon from Entypo pack. Depends on {@see $field_icon_library}
      */
     $field_icon_entypo = array('type' => 'iconpicker', 'param_name' => 'icon_entypo', 'heading' => $heading_icon, 'settings' => array('type' => 'entypo', 'emptyIcon' => true, 'iconsPerPage' => 300), 'dependency' => array('element' => 'icon_lib', 'value' => 'entypo'));
     /**
      * @var array Icon from Linecons pack. Depends on {@see $field_icon_library}
      */
     $field_icon_linecons = array('type' => 'iconpicker', 'param_name' => 'icon_linecons', 'heading' => $heading_icon, 'settings' => array('type' => 'linecons', 'emptyIcon' => false, 'iconsPerPage' => 200), 'dependency' => array('element' => 'icon_lib', 'value' => 'linecons'));
     /**
      * @var array Icon from Flaticons pack. Depends on {@see $field_icon_library}
      */
     $field_icon_flaticons = array('type' => 'iconpicker', 'param_name' => 'icon_flaticons', 'heading' => $heading_icon, 'settings' => array('type' => 'flaticons', 'emptyIcon' => true, 'iconsPerPage' => 350), 'dependency' => array('element' => 'icon_lib', 'value' => 'flaticons'));
     /*
      * Add "Caption" tab with parameters to vc_single_image
      */
     $caption = __('Caption', 'appica');
     $vc_single_image_caption = array(array('type' => 'checkbox', 'param_name' => 'is_caption_used', 'heading' => __('Use caption?', 'appica'), 'description' => __('Add a fancy small description under the image', 'appica'), 'group' => $caption, 'value' => array(__('Yes', 'appica') => 'yes')), array('type' => 'textfield', 'param_name' => 'caption_line', 'heading' => __('Enter your caption line', 'appica'), 'description' => __('Leave this field empty if you want to show the caption from media library.', 'appica'), 'group' => $caption), array('type' => 'dropdown', 'param_name' => 'caption_align', 'heading' => __('Caption alignment', 'appica'), 'group' => $caption, 'std' => 'right', 'value' => $left_right_value), array('type' => 'textfield', 'param_name' => 'caption_class', 'heading' => __('Caption extra class name', 'appica'), 'description' => __('Add extra classes, if you wish to style particular content element differently.', 'appica'), 'group' => $caption));
     vc_add_params('vc_single_image', $vc_single_image_caption);
     /*
      * Add "Badge" tab with parameters to vc_row & vc_row_inner
      */
     $badge = __('Badge', 'appica');
     $vc_row_badge = array(array('type' => 'dropdown', 'param_name' => 'badge', 'heading' => __('Display Badge', 'appica'), 'description' => __('N.B. To use badge "container" on "General" tab must set to "yes".', 'appica'), 'group' => $badge, 'std' => 'hide', 'value' => $show_hide_value), array('type' => 'dropdown', 'param_name' => 'badge_align', 'heading' => __('Align', 'appica'), 'group' => $badge, 'std' => 'left', 'value' => $left_right_value), array('type' => 'textfield', 'param_name' => 'badge_title', 'heading' => __('Badge Title', 'appica'), 'description' => __('Will be shown near the badge. How text will be aligned depends on previous param.', 'appica'), 'group' => $badge), array_merge($field_icon_library, array('group' => $badge)), array_merge($field_icon_fontawesome, array('group' => $badge)), array_merge($field_icon_openiconic, array('group' => $badge)), array_merge($field_icon_typicons, array('group' => $badge)), array_merge($field_icon_entypo, array('group' => $badge)), array_merge($field_icon_linecons, array('group' => $badge)), array_merge($field_icon_flaticons, array('group' => $badge)), array('type' => 'dropdown', 'param_name' => 'badge_pc', 'heading' => __('Predefined Gradient Color', 'appica'), 'description' => __('Choose one from predefined colors', 'appica'), 'param_holder_class' => 'appica-badge-color', 'group' => $badge, 'std' => 'default', 'value' => array(__('Default', 'appica') => 'default', __('Color 1', 'appica') => 'alt-color', __('Color 2', 'appica') => 'alt-color-2', __('Color 3', 'appica') => 'alt-color-3', __('Color 4', 'appica') => 'alt-color-4')), array('type' => 'colorpicker', 'param_name' => 'badge_cc', 'heading' => __('Custom Color', 'appica'), 'description' => __('This param overrides previous.', 'appica'), 'group' => $badge), array('type' => 'colorpicker', 'param_name' => 'badge_btc', 'heading' => __('Border Top Color', 'appica'), 'description' => __('Custom fancy line above badge. Just leave empty if you don\'t want to see it.', 'appica'), 'group' => $badge), array('type' => 'colorpicker', 'param_name' => 'badge_tc', 'heading' => __('Text Color', 'appica'), 'description' => __('Customize your badges text color!', 'appica'), 'value' => '#bebebe', 'group' => $badge), array('type' => 'textfield', 'param_name' => 'badge_class', 'heading' => __('Extra class name', 'appica'), 'description' => __('Add extra classes, if you wish to style particular content element differently.', 'appica'), 'group' => $badge));
     vc_add_params('vc_row', $vc_row_badge);
     vc_add_params('vc_row_inner', $vc_row_badge);
     /*
      * Add "Content color" param to vc_row
      */
     vc_add_param('vc_row', array('type' => 'dropdown', 'param_name' => 'content_color', 'heading' => __('Content color', 'appica'), 'description' => __('You can adjust this color in Global Colors Settings: for dark customize Body Text Color / for light customize Light Text Color', 'appica'), 'std' => 'dark', 'value' => array(__('Light', 'appica') => 'light', __('Dark', 'appica') => 'dark')));
     /**
      * Add "ID" field to vc_row params
      *
      * @since 1.1.0 Rename param and change description
      * @since 1.0.0
      */
     vc_add_param('vc_row', array('type' => 'textfield', 'param_name' => 'uniq_id', 'heading' => __('Row ID', 'appica'), 'description' => __('Enter row ID (Note: make sure it is unique and valid according to <a href="http://www.w3schools.com/tags/att_global_id.asp" target="_blank">w3c specification</a>). Also used for anchored navigation.', 'appica'), 'value' => 'r' . uniqid()));
     /*
      * Add "Container" dropdown to vc_row
      */
     vc_add_param('vc_row', array('type' => 'dropdown', 'param_name' => 'is_container', 'heading' => __('Add container to row', 'appica'), 'std' => 'yes', 'value' => $value_yes_no));
     /*
      * Add "Overlay" tab to vc_row shortcode
      */
     $overlay = __('Overlay', 'appica');
     $vc_row_overlay = array(array('type' => 'dropdown', 'param_name' => 'overlay', 'heading' => $overlay, 'description' => __('Enable/Disable overlay', 'appica'), 'group' => $overlay, 'std' => 'disable', 'value' => $enable_disable_value), array('type' => 'dropdown', 'param_name' => 'overlay_partial', 'heading' => __('Use partial overlay', 'appica'), 'description' => __('Partial overlay covers only a half of block', 'appica'), 'group' => $overlay, 'std' => 'no', 'value' => $value_yes_no), array('type' => 'dropdown', 'param_name' => 'overlay_type', 'heading' => __('Color type', 'appica'), 'group' => $overlay, 'std' => 'gradient', 'value' => array(__('Solid', 'appica') => 'solid', __('Gradient', 'appica') => 'gradient')), array('type' => 'colorpicker', 'param_name' => 'overlay_sc', 'heading' => __('Choose solid color', 'appica'), 'group' => $overlay, 'dependency' => array('element' => 'overlay_type', 'value' => 'solid')), array('type' => 'colorpicker', 'param_name' => 'overlay_gc_start', 'class' => 'appica-core-overlay-gr-start', 'heading' => __('Start gradient color', 'appica'), 'group' => $overlay, 'dependency' => array('element' => 'overlay_type', 'value' => 'gradient')), array('type' => 'colorpicker', 'param_name' => 'overlay_gc_end', 'heading' => __('End gradient color', 'appica'), 'group' => $overlay, 'dependency' => array('element' => 'overlay_type', 'value' => 'gradient')), array('type' => 'textfield', 'param_name' => 'overlay_opacity', 'heading' => __('Opacity, %', 'appica'), 'description' => __('From 0 to 100', 'appica'), 'group' => $overlay, 'value' => 70));
     vc_add_params('vc_row', $vc_row_overlay);
     /*
      * Remove "Row stretch" param from vc_row
      * Make .vc_row always full width
      */
     vc_remove_param('vc_row', 'full_width');
     /*
      * Remove params "title" and "interval" from vc_tour & vc_tabs shortcode
      */
     vc_remove_param('vc_tour', 'title');
     vc_remove_param('vc_tour', 'interval');
     vc_remove_param('vc_tabs', 'title');
     vc_remove_param('vc_tabs', 'interval');
     /**
      * @var array "Title" shortcode param
      */
     $appica_field_title = array('type' => 'textfield', 'param_name' => 'title', 'weight' => 10, 'heading' => __('Title', 'appica'), 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'appica'));
     /*
      * Change weight of "title" param in vc_tour & vc_tabs shortcode
      */
     vc_add_param('vc_tour', $appica_field_title);
     vc_add_param('vc_tabs', $appica_field_title);
     /**
      * @var array "Subtitle" shortcode param
      */
     $appica_field_subtitle = array('type' => 'textfield', 'param_name' => 'subtitle', 'weight' => 9, 'heading' => __('Subtitle', 'appica'));
     /*
      * Add "Subtitle" param to vc_tabs & vc_tour
      */
     vc_add_param('vc_tour', $appica_field_subtitle);
     vc_add_param('vc_tabs', $appica_field_subtitle);
     /**
      * @var array Value left/right for shortcode params
      */
     $appica_value_left_right = array(__('Left', 'appica') => 'left', __('Right', 'appica') => 'right');
     /**
      * @var array "Text Align" shortcode param
      */
     $appica_text_align = array('type' => 'dropdown', 'param_name' => 'text_align', 'weight' => 7, 'heading' => __('Text align', 'appica'), 'description' => __('Applied only for "tab" column', 'appica'), 'std' => 'left', 'value' => array_merge($appica_value_left_right, array(__('Center', 'appica') => 'center')));
     /*
      * Add "Text align" param to vc_tour & vc_tabs
      */
     vc_add_param('vc_tabs', $appica_text_align);
     vc_add_param('vc_tour', $appica_text_align);
     /**
      * @var array Content position for vc_tour & vc_tabs shortcodes
      */
     $appica_content_position = array('type' => 'dropdown', 'param_name' => 'position', 'weight' => 6, 'heading' => __('Content position', 'appica'), 'description' => __('Choose your content column position', 'appica'), 'std' => 'right', 'value' => $appica_value_left_right);
     /*
      * Add "Content Position" param to vc_tour & vc_tabs
      */
     vc_add_param('vc_tour', $appica_content_position);
     vc_add_param('vc_tabs', $appica_content_position);
     /*
      * Add "Description" param to vc_tabs only
      */
     vc_add_param('vc_tabs', array('type' => 'textarea', 'param_name' => 'description', 'weight' => 8, 'heading' => __('Description', 'appica')));
     /*
      * Add "transition" param to vc_tab
      */
     vc_add_param('vc_tab', array('type' => 'dropdown', 'param_name' => 'transition', 'heading' => __('Animation effect', 'appica'), 'std' => 'top', 'value' => array(__('Fade', 'appica') => 'fade_', __('Scale', 'appica') => 'scale', __('Scale Up', 'appica') => 'scaleup', __('Top', 'appica') => 'top', __('Bottom', 'appica') => 'bottom', __('Left', 'appica') => 'left', __('Right', 'appica') => 'right', __('Flip', 'appica') => 'flip')));
     /*
      * Add "Offset" param to vc_column_inner
      */
     vc_add_param('vc_column_inner', array('type' => 'column_offset', 'param_name' => 'offset', 'heading' => __('Responsiveness', 'appica'), 'group' => __('Width & Responsiveness', 'appica'), 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'appica')));
     /*
      * Remove unnecessary & unsupported shortcodes
      */
     vc_remove_element('vc_custom_heading');
     vc_remove_element('vc_posts_grid');
     vc_remove_element('vc_media_grid');
     vc_remove_element('vc_masonry_grid');
     vc_remove_element('vc_masonry_media_grid');
     vc_remove_element('vc_basic_grid');
     vc_remove_element('vc_facebook');
     vc_remove_element('vc_tweetmeme');
     vc_remove_element('vc_googleplus');
     vc_remove_element('vc_pinterest');
     vc_remove_element('vc_cta_button');
     vc_remove_element('vc_cta_button2');
     vc_remove_element('vc_flickr');
     vc_remove_element('vc_toggle');
     vc_remove_element('vc_gallery');
     vc_remove_element('vc_posts_slider');
     vc_remove_element('vc_wp_categories');
     vc_remove_element('vc_wp_posts');
     vc_remove_element('vc_wp_meta');
     vc_remove_element('vc_wp_calendar');
     vc_remove_element('vc_wp_tagcloud');
     vc_remove_element('vc_wp_rss');
     /**
      * Remove vc_row params:
      * - parallax
      * - el_id
      *
      * Because Appica 2 has own implementation of vc_row
      * and does not support these features.
      *
      * @since 1.1.0
      */
     vc_remove_param('vc_row', 'parallax');
     vc_remove_param('vc_row', 'el_id');
     /**
      * Add new param "Device color" to "Gadgets Slideshow"
      * Only for iOS version
      *
      * @since 1.2.0
      */
     vc_add_param('appica_gadgets_slideshow', array('type' => 'dropdown', 'param_name' => 'color', 'heading' => __('Devices color', 'appica'), 'description' => __('This option affects iPad and iPhone device', 'appica'), 'std' => 'gold', 'value' => array(__('Gold', 'appica') => 'gold', __('Silver', 'appica') => 'silver', __('Space Gray', 'appica') => 'space-gray')));
     /**
      * Remove vc_row "parallax_image" param
      *
      * @since 1.3.0
      */
     vc_remove_param('vc_row', 'parallax_image');
 }
コード例 #23
0
ファイル: custom-heading.php プロジェクト: novichkovv/prlab
<?php

vc_add_params('vc_custom_heading', array(array('type' => 'textfield', 'heading' => __('Font Weight', 'tm-polygon'), 'param_name' => 'tm_font_weight'), array('type' => 'dropdown', 'heading' => __('Text Transform', 'tm-polygon'), 'param_name' => 'tm_text_transform', 'value' => array(__('None', 'tm-polygon') => 'none', __('Capitalize', 'tm-polygon') => 'capitalize', __('Uppercase', 'tm-polygon') => 'uppercase', __('Lowercase', 'tm-polygon') => 'lowercase', __('Initial', 'tm-polygon') => 'initial', __('Inherit', 'tm-polygon') => 'inherit')), array('type' => 'textfield', 'heading' => __('Letter Spacing', 'tm-polygon'), 'param_name' => 'tm_letter_spacing')));
コード例 #24
0
 /**
  * Add new attributes to setting form of existing short code
  *
  * @access private
  */
 private function addAttributes()
 {
     $this->create();
     $controls = $this->getControls();
     if (function_exists('vc_add_params')) {
         vc_add_params($this->tag_base, $controls);
     }
 }
コード例 #25
0
ファイル: vc_config.php プロジェクト: solsticehc/citadel
vc_remove_param('vc_row', 'css');
vc_add_params('vc_row', array(array("type" => "dropdown", "heading" => __("Columns Type", "js_composer"), "param_name" => "columns_type", "value" => array(__("Default columns", "js_composer") => "default", __("Columns with wider gaps", "js_composer") => "wide", __("Boxed columns without gaps", "js_composer") => "none"), "description" => ''), array("type" => "checkbox", "heading" => __("Separate Section", "js_composer"), "param_name" => "section", "value" => array(__("Place this row into a separate section", "js_composer") => "yes")), array("type" => "checkbox", "heading" => __("Full Screen Section", "js_composer"), "param_name" => "full_screen", "value" => array(__("Make this section height equal to the screen height", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "checkbox", "param_name" => "vertical_centering", "value" => array(__("Center content of this section by vertical", "js_composer") => "yes"), "dependency" => array('element' => "full_screen", 'not_empty' => true)), array("type" => "checkbox", "heading" => __("Full Width Content", "js_composer"), "param_name" => "full_width", "value" => array(__("Stretch content to the full width", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "checkbox", "heading" => __("Full Height Content", "js_composer"), "param_name" => "full_height", "value" => array(__("Remove vertical indents", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Section Color Style", "js_composer"), "param_name" => "background", "value" => array(__('Main Content (default)', "js_composer") => "", __('Alternate Content', "js_composer") => "alternate", __('Primary background color & White text color', "js_composer") => "primary", __('Secondary background color & White text color', "js_composer") => "secondary", __('Custom colors', "js_composer") => 'custom'), "description" => "", "dependency" => array('element' => "section", 'not_empty' => true)), array('param_name' => 'bg_color_info', 'type' => 'textfield', "heading" => __("Background Color"), 'description' => __('You can set custom background color in "Design Options" tab', 'js_composer'), 'value' => '', "dependency" => array('element' => "background", 'value' => 'custom'), "edit_field_class" => "vc_col-sm-6 vc_column us-info-text"), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Text Color"), "param_name" => "section_text_color", "description" => '', "dependency" => array('element' => "background", 'value' => 'custom'), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "attach_image", "heading" => __("Section Background Image", "js_composer"), "param_name" => "img", "value" => "", "description" => '', "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Parallax Effect", "js_composer"), "param_name" => "parallax", "value" => array(__("None", "js_composer") => "", __("Vertical Parallax", "js_composer") => "vertical", __("Horizontal Parallax", "js_composer") => "horizontal", __('Still (Image not moves)', "js_composer") => "still"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Parallax Background Width", "js_composer"), "param_name" => "parallax_bg_width", "value" => array("110%" => "110", "120%" => "120", "130%" => "130", "140%" => "140", "150%" => "150"), "description" => '', "dependency" => array('element' => "parallax", 'value' => array('horizontal'))), array("type" => "checkbox", "heading" => __("Reverse Parallax", "js_composer"), "param_name" => "parallax_reverse", "value" => array(__("Reverse Parallax Effect", "js_composer") => "yes"), "dependency" => array('element' => "parallax", 'value' => array('vertical'))), array("type" => "checkbox", "heading" => __("Background Video", "js_composer"), "param_name" => "video", "value" => array(__("Apply Background Video to this section", "js_composer") => "yes"), "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "textfield", "heading" => __("MP4 video file", "js_composer"), "param_name" => "video_mp4", "description" => __("Add link to MP4 video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("OGV video file", "js_composer"), "param_name" => "video_ogg", "description" => __("Add link to OGV video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "textfield", "heading" => __("WebM video file", "js_composer"), "param_name" => "video_webm", "description" => __("Add link to WebM video file", "js_composer"), "dependency" => array('element' => "video", 'not_empty' => true)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Overlay Color"), "param_name" => "section_overlay", "description" => '', "dependency" => array('element' => "section", 'not_empty' => true)), array("type" => "textfield", "heading" => __("Row/Section ID", "js_composer"), "param_name" => "section_id", "description" => ''), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "description" => ''), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
vc_remove_param('vc_row_inner', 'el_class');
vc_remove_param('vc_row_inner', 'el_id');
vc_remove_param('vc_row_inner', 'css');
vc_add_params('vc_row_inner', array(array("type" => "dropdown", "heading" => __("Columns Type", "js_composer"), "param_name" => "columns_type", "value" => array(__("Default columns", "js_composer") => "default", __("Columns with wider gaps", "js_composer") => "wide", __("Boxed columns without gaps", "js_composer") => "none"), "description" => ''), array("type" => "textfield", "heading" => __("Row ID", "js_composer"), "param_name" => "section_id", "description" => ''), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
// Change params for Column - vc_column
vc_remove_param('vc_column', 'el_class');
vc_remove_param('vc_column', 'css');
vc_remove_param('vc_column', 'width');
vc_remove_param('vc_column', 'offset');
vc_add_params('vc_column', array(array("type" => "colorpicker", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "value" => '', "description" => ''), $add_css_animation, $add_css_animation_delay, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
vc_remove_param('vc_column_inner', 'el_class');
vc_remove_param('vc_column_inner', 'css');
vc_remove_param('vc_column_inner', 'width');
vc_add_params('vc_column_inner', array(array("type" => "colorpicker", "class" => "", "heading" => __("Text Color"), "param_name" => "text_color", "value" => '', "description" => ''), $add_css_animation, $add_css_animation_delay, array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer'))));
/* Single image */
vc_map(array('name' => __('Single Image', 'js_composer'), 'base' => 'vc_single_image', 'icon' => 'icon-wpb-single-image', 'category' => __('Content', 'js_composer'), 'description' => __('Single image with CSS animation', 'js_composer'), 'params' => array(array("type" => "attach_image", "heading" => __("Image", "js_composer"), "param_name" => "image", "value" => "", "description" => __("Select image from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Image Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Default', "js_composer") => "", __('Left', "js_composer") => "left", __('Center', "js_composer") => "center", __('Right', "js_composer") => "right"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Image Size", "js_composer"), "param_name" => "img_size", "value" => array(__("Full Size", "js_composer") => "full", __("Large (set in Media Settings)", "js_composer") => "large", __("Medium (set in Media Settings)", "js_composer") => "medium", __("Thumbnail (set in Media Settings)", "js_composer") => "thumbnail"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => 'checkbox', "heading" => '', "param_name" => "img_link_large", "description" => "", "value" => array(__("Open original image in a lightbox on click", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Image link", "js_composer"), "param_name" => "img_link", "description" => __("Enter URL if you want this image to have a link.", "js_composer"), "dependency" => array('element' => "img_link_large", 'is_empty' => true)), array('type' => 'checkbox', 'heading' => '', 'param_name' => 'img_link_new_tab', 'value' => array(__('Open this link in a new tab', 'js_composer') => true), "dependency" => array('element' => "img_link", 'not_empty' => true)), $add_css_animation, $add_css_animation_delay, array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')), array('type' => 'css_editor', 'heading' => __('Css', 'js_composer'), 'param_name' => 'css', 'group' => __('Design options', 'js_composer')))));
/* Image Gallery
---------------------------------------------------------- */
vc_map(array('name' => __('Image Gallery', 'js_composer'), 'base' => 'vc_gallery', 'icon' => 'icon-wpb-images-stack', 'category' => __('Content', 'js_composer'), 'description' => __('Responsive image gallery', 'js_composer'), 'params' => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Columns", "js_composer"), "param_name" => "columns", "value" => array('1 column' => '1', '2 columns' => '2', '3 columns' => '3', '4 columns' => '4', '5 columns' => '5', '6 columns' => '6', '7 columns' => '7', '8 columns' => '8', '9 columns' => '9', '10 columns' => '10'), "description" => ''), array("type" => 'checkbox', "heading" => __("Masonry Grid", "js_composer"), "param_name" => "masonry", "description" => "", "value" => array(__("Display thumbs with the initial proportions", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => __("Indents", "js_composer"), "param_name" => "indents", "description" => "", "value" => array(__("Add indents between thumbnails", "js_composer") => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Image Slider
---------------------------------------------------------- */
vc_map(array("name" => __("Image Slider", "js_composer"), "base" => "vc_simple_slider", "icon" => "icon-wpb-images-stack", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "ids", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Navigation Arrows", "js_composer"), "param_name" => "arrows", "value" => array(__("Show always", "js_composer") => "always", __("Show on hover", "js_composer") => "hover", __("Hide", "js_composer") => "hide"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => "dropdown", "heading" => __("Additional Navigation", "js_composer"), "param_name" => "nav", "value" => array(__("None", "js_composer") => "none", __("Dots", "js_composer") => "dots", __("Thumbs", "js_composer") => "thumbs"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => "dropdown", "heading" => __("Transition Effect", "js_composer"), "param_name" => "transition", "value" => array(__("Slide", "js_composer") => "slide", __("Fade", "js_composer") => "fade", __("Dissolve", "js_composer") => "dissolve"), "description" => '', "edit_field_class" => "vc_col-sm-4 vc_column"), array("type" => 'checkbox', "heading" => '', "param_name" => "auto_rotation", "value" => array(__("Enable Auto Rotation", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => '', "param_name" => "fullscreen", "value" => array(__("Allow Full Screen view", "js_composer") => 'yes')), array("type" => 'checkbox', "heading" => '', "param_name" => "stretch", "value" => array(__("Stretch all images to full size of this slider", "js_composer") => 'yes')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Separator (Divider)
---------------------------------------------------------- */
vc_map(array('name' => __('Separator', 'js_composer'), 'base' => 'vc_separator', 'icon' => 'icon-wpb-ui-separator', 'category' => __('Content', 'js_composer'), 'description' => __('Horizontal separator line', 'js_composer'), 'params' => array(array("type" => "dropdown", "heading" => __("Separator Type", "js_composer"), "param_name" => "type", "value" => array(__('Default', "js_composer") => "", __('Full Width', "js_composer") => "fullwidth", __('Short', "js_composer") => "short", __('Invisible', "js_composer") => "invisible"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Separator Size", "js_composer"), "param_name" => "size", "value" => array(__('Medium', "js_composer") => "", __('Small', "js_composer") => "small", __('Large', "js_composer") => "big", __('Huge', "js_composer") => "huge"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Icon (optional)", "js_composer"), "param_name" => "icon", "value" => "", "description" => sprintf(__('FontAwesome Icon name. %s', "js_composer"), '<a href="http://fontawesome.io/icons/" target="_blank">Full list of icons</a>'), "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Text (optional)", "js_composer"), "param_name" => "text", "value" => "", "description" => 'Displays text in the middle of this separator', "edit_field_class" => "vc_col-sm-6 vc_column"), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer')))));
/* Button
---------------------------------------------------------- */
vc_map(array("name" => __("Button", "js_composer"), "base" => "vc_button", "icon" => "icon-wpb-ui-button", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Button Label", "js_composer"), "holder" => "button", "class" => "wpb_button", "param_name" => "text", "value" => __("Click me", "js_composer"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Button Link", "js_composer"), "param_name" => "url", "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Color", "js_composer"), "param_name" => "type", "value" => array(__("Primary (theme color)", "js_composer") => "primary", __("Secondary (theme color)", "js_composer") => "secondary", __("Contrast (theme color)", "js_composer") => "contrast", __("Faded (theme color)", "js_composer") => "default", __("White", "js_composer") => "white", __("Pink", "js_composer") => "pink", __("Blue", "js_composer") => "blue", __("Green", "js_composer") => "green", __("Yellow", "js_composer") => "yellow", __("Purple", "js_composer") => "purple", __("Red", "js_composer") => "red", __("Lime", "js_composer") => "lime", __("Navy", "js_composer") => "navy", __("Cream", "js_composer") => "cream", __("Brown", "js_composer") => "brown", __("Midnight", "js_composer") => "midnight", __("Teal", "js_composer") => "teal", __("Transparent", "js_composer") => "transparent"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => 'checkbox', "heading" => __("Button Style", "js_composer"), "param_name" => "outlined", "value" => array(__("Apply Outlined Style to the Button", "js_composer") => 'yes'), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "textfield", "heading" => __("Button Icon (optional)", "js_composer"), "param_name" => "icon", "description" => sprintf(__('FontAwesome Icon name. %s', "js_composer"), '<a href="http://fontawesome.io/icons/" target="_blank">Full list of icons</a>')), array("type" => "dropdown", "heading" => __("Button Size", "js_composer"), "param_name" => "size", "value" => array(__("Medium", "js_composer") => "", __("Small", "js_composer") => "small", __("Large", "js_composer") => "big"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "dropdown", "heading" => __("Button Alignment", "js_composer"), "param_name" => "align", "value" => array(__('Left', "js_composer") => "left", __('Center', "js_composer") => "center", __('Right', "js_composer") => "right"), "description" => '', "edit_field_class" => "vc_col-sm-6 vc_column"), array("type" => "checkbox", "heading" => '', "param_name" => "target", "value" => array(__('Open button link in a new tab', 'js_composer') => 1), "dependency" => array('element' => "href", 'not_empty' => true)), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))), "js_view" => 'VcButtonView'));
/* Tabs
コード例 #26
-1
ファイル: custom-fields.php プロジェクト: hikaram/wee
function kt_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    add_shortcode_param('kt_select_image', 'vc_kt_select_image_settings_field');
    add_shortcode_param('kt_categories', 'vc_kt_categories_settings_field');
    add_shortcode_param('kt_number', 'vc_ktnumber_settings_field');
    add_shortcode_param('kt_taxonomy', 'vc_kt_taxonomy_settings_field', KUTETHEME_PLUGIN_URL . '/js_composer/js/chosen/chosen.jquery.min.js');
}