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')));
}
function wps_to_vc_wps_mediabox_shortcode()
{
    // Add custom parameters
    $attributes = array(array('type' => 'textfield', 'heading' => 'Title', 'param_name' => 'title', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Title', 'wps-prime'), 'description' => __('Add mediabox title.', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Type Extra Class', 'param_name' => 'title_class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Title', 'wps-prime'), 'description' => __('Add custom CSS class.', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Mediabox Class', 'param_name' => 'class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Classes', 'wps-prime'), 'description' => __('Add custom CSS class.', 'wps-prime')), array('type' => 'attach_image', 'heading' => 'Attach Image', 'admin_label' => true, 'param_name' => 'image_id', 'value' => '', 'group' => esc_html__('Image/Icon', 'wps-prime'), 'description' => __('Set an image', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Icon Class', 'admin_label' => true, 'param_name' => 'ico_class', 'value' => '', 'group' => esc_html__('Image/Icon', 'wps-prime'), 'description' => __('Set an icon class', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Image Class', 'admin_label' => true, 'param_name' => 'image_class', 'value' => '', 'group' => esc_html__('Image/Icon', 'wps-prime'), 'description' => __('Add custom class', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Image link', 'admin_label' => true, 'param_name' => 'image_link', 'value' => '', 'group' => esc_html__('Image/Icon', 'wps-prime'), 'description' => __('Add custom link', 'wps-prime')), array('type' => 'dropdown', 'heading' => 'Image size', 'param_name' => 'image_size', 'value' => wps_image_sizes(), 'std' => 'full', 'group' => esc_html__('Image/Icon', 'wps-prime'), 'description' => __('Set custom image size ( Default: ‘full’)', 'wps-prime')), array('type' => 'checkbox', 'heading' => 'Divider', 'param_name' => 'divider', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Divider', 'wps-prime'), 'description' => __('Use Divider.', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Divider Extra Class', 'param_name' => 'divider_class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Divider', 'wps-prime'), 'description' => __('Add custom CSS class.', 'wps-prime')), array('type' => 'dropdown', 'heading' => 'Media Type', 'admin_label' => true, 'param_name' => 'type', 'value' => array('Default' => false, 'Flag' => 'flag', 'Media' => 'media'), 'group' => esc_html__('Media settings', 'wps-prime'), 'description' => __('Set media type', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Type Extra Class', 'param_name' => 'type_class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Media settings', 'wps-prime'), 'description' => __('Add custom CSS class.', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Type Body Class', 'param_name' => 'type_body_class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Media settings', 'wps-prime'), 'description' => __('Add custom CSS class.', 'wps-prime')), array('type' => 'textfield', 'heading' => 'Type Image Class', 'param_name' => 'type_img_class', 'admin_label' => true, 'value' => '', 'group' => esc_html__('Media settings', 'wps-prime'), 'description' => __('Add custom CSS class.', 'wps-prime')), array('type' => 'textarea_html', 'heading' => __('Content', 'wps-prime'), 'holder' => 'div', 'group' => esc_html__('Content', 'wps-prime'), 'param_name' => 'content'));
    // Title
    vc_map(array('name' => __('Mediabox'), 'base' => 'wps_mediabox', 'description' => 'Holds an image an text combination, you can add title and divider.', 'category' => __('Content'), 'icon' => 'icon-wpb-toggle-small-expand', 'params' => $attributes));
}
Example #3
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')));
}