本文整理汇总了PHP中vc_remove_param函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_remove_param函数的具体用法?PHP vc_remove_param怎么用?PHP vc_remove_param使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_remove_param函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wps_vc_column_inner_shortcode
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: kt_add_option_to_vc
function kt_add_option_to_vc()
{
$color_arr = array('vc_btn', 'vc_icon', 'vc_tta_accordion', 'vc_tta_tabs', 'vc_tta_tour');
foreach ($color_arr as $item) {
$button_colors = WPBMap::getParam($item, 'color');
$button_colors['value'][esc_html__('Accent color', 'adroit')] = 'accent';
vc_update_shortcode_param($item, $button_colors);
}
$background_arr = array('vc_icon');
foreach ($background_arr as $item) {
$button_colors = WPBMap::getParam($item, 'background_color');
$button_colors['value'][esc_html__('Accent color', 'adroit')] = 'accent';
vc_update_shortcode_param($item, $button_colors);
}
$image_styles = WPBMap::getParam('vc_single_image', 'style');
$image_styles['value'][esc_html__('Border box', 'adroit')] = 'border-box';
$image_styles['value'][esc_html__('Border box Left', 'adroit')] = 'border-left';
$image_styles['value'][esc_html__('Border box Right', 'adroit')] = 'border-right';
$image_styles['value'][esc_html__('Creative Left', 'adroit')] = 'creative-left';
$image_styles['value'][esc_html__('Creative Right', 'adroit')] = 'creative-right';
$image_styles['value'][esc_html__('Creative When hover', 'adroit')] = 'creative-hover';
vc_update_shortcode_param('vc_single_image', $image_styles);
$icon_btn = array('i_type', 'i_icon_fontawesome', 'i_icon_openiconic', 'i_icon_typicons', 'i_icon_entypo', 'i_icon_linecons', 'i_icon_pixelicons', 'css_animation', 'el_class');
foreach ($icon_btn as $item) {
vc_remove_param('vc_btn', $item);
}
}
示例3: stm_update_existing_shortcodes
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");
}
}
示例4: webnus_setup_vc_posts_grid
function webnus_setup_vc_posts_grid()
{
vc_remove_param('vc_posts_grid', 'grid_layout');
$vc_layout_sub_controls = array(array('link_post', __("Link to post", "js_composer")), array("no_link", __("No link", "js_composer")), array("link_image", __("Link to bigger image", "js_composer")));
$attributes = array("type" => "sorted_list", "heading" => __("Teaser layout", "js_composer"), "param_name" => "grid_layout", "description" => __("Control teasers look. Enable blocks and place them in desired order. Note: This setting can be overrriden on post to post basis.", "js_composer"), "value" => "title,image,text", "options" => array(array('image', __('Thumbnail', "js_composer"), $vc_layout_sub_controls), array('title', __('Title', "js_composer"), $vc_layout_sub_controls), array('text', __('Text', "js_composer"), array(array('excerpt', __('Teaser/Excerpt', "js_composer")), array('text', __('Full content', "js_composer")))), array('meta_author', __('Metadata Author', "js_composer")), array('meta_category', __('Metadata Category', "js_composer")), array('meta_date', __('Metadata Date', "js_composer")), array('meta_comments', __('Metadata Comments', "js_composer"))));
vc_add_param('vc_posts_grid', $attributes);
}
示例5: wps_vc_column_text_shortcode
function wps_vc_column_text_shortcode()
{
// Remove Default Parameters
vc_remove_param('vc_column_text', 'css_animation');
vc_remove_param('vc_column_text', 'css');
vc_map_update('vc_column_text', array('html_template' => locate_template('vc_templates/vc_column_text.php')));
}
示例6: something
function something()
{
$icons = array('type' => 'dropdown', 'heading' => 'Icon library', 'value' => array('Font Awesome' => 'fontawesome', 'Open Iconic' => 'openiconic', 'Typicons' => 'typicons', 'Entypo' => 'entypo', 'Linecons' => 'linecons', 'Pixel' => 'pixelicons', 'Ion icons' => 'ionicons'), 'param_name' => 'i_type', 'description' => 'Select icon library.', 'dependency' => array('element' => 'add_icon', 'value' => 'true'), 'integrated_shortcode' => 'vc_icon', 'integrated_shortcode_field' => 'i_');
$ionicons = array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'i_icon_ionicons', 'settings' => array('emptyIcon' => false, 'type' => 'ionicons', 'source' => require_once 'ionicons.php'), 'dependency' => array('element' => 'i_type', 'value' => 'ionicons'), 'description' => __('Select icon from library.', 'js_composer'));
vc_remove_param('vc_btn', 'i_type');
vc_add_param('vc_btn', $icons);
vc_add_param('vc_btn', $ionicons);
}
示例7: deleteParam
protected function deleteParam($name, $element)
{
if (is_array($element)) {
foreach ($element as $value) {
vc_remove_param($name, $value);
}
} else {
vc_remove_param($name, $element);
}
}
示例8: vc_remove_standard_params
/**
* Removes specified params from standard Visual Composer elements
*/
function vc_remove_standard_params()
{
// Row
vc_remove_param('vc_row', 'parallax');
vc_remove_param('vc_row', 'parallax_image');
vc_remove_param('vc_row', 'el_id');
vc_remove_param('vc_row', 'el_class');
// Btn
vc_remove_param('vc_btn', 'css_animation');
vc_remove_param('vc_btn', 'el_class');
wp_register_style('ionicons', VCADMINURL . 'assets/css/ionicons.min.css', false, '1.0.0');
}
示例9: wps_vc_row_inner_shortcode
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')));
}
示例10: vc_map_update
vc_map_update('vc_tab', $toggle_setting);
}
$tab_icon = array('type' => 'dropdown', 'heading' => __('Icon', 'kraftives'), 'param_name' => 'tab_icon', 'value' => folio_icons(), 'description' => __('Tab Icon.', 'kraftives'), 'param_holder_class' => 'vc-colored-dropdown');
if (function_exists('vc_add_param')) {
vc_add_param('vc_tab', $tab_icon);
}
//Vc_tab end
/*###################################################################################
/## KraftiveComments: Extend Toggle ##/
#####################################################################################*/
$toggle_setting = array('name' => __('Folio Toggle', 'kraftives'), 'category' => __('Folio Zee Modules', 'kraftives'));
if (function_exists('vc_map_update')) {
vc_map_update('vc_toggle', $toggle_setting);
}
if (function_exists('vc_remove_param')) {
vc_remove_param("vc_toggle", "css_animation");
}
//Vc_toggle end
/*###################################################################################
/## KraftiveComments: Custom Params ##/
#####################################################################################*/
// Generate param type "number"
add_action('admin_init', 'folio_generate_shortcode_params');
function folio_generate_shortcode_params()
{
/* Generate param type "number" */
if (function_exists('add_shortcode_param')) {
add_shortcode_param('number', 'folio_number_settings_field');
add_shortcode_param('tab_id', 'folio_tab_id_form_field');
}
}
示例11: removeAttribute
/**
* Remove attributes
*
* @param array $attributes
*
* @access private
*/
private function removeAttribute(array $attributes)
{
foreach ($attributes as $attribute) {
vc_remove_param($this->tag_base, $attribute);
}
}
示例12: wp_enqueue_script
wp_enqueue_script('my-admin', THEME_DIR_URI . '/js/my-admin.js', array('jquery'));
// wp_enqueue_style( 'berg-wp-style', THEME_DIR_URI .'/admin/includes/css/admin.css' );
}
/*
** visual composer remove elements and chcange params
*/
if (defined('WPB_VC_VERSION')) {
vc_remove_param("vc_button", "color");
vc_add_param("vc_button", array('type' => 'dropdown', 'heading' => __('Color', THEME_NAME), 'param_name' => 'color', 'value' => array('Outline 1' => 'btn-default', 'Outline 2' => 'btn-white', 'Highlight color' => 'btn-color', 'Background color' => 'btn-dark'), 'description' => __('Button color.', THEME_NAME), 'param_holder_class' => 'vc_colored-dropdown'));
vc_remove_param("vc_button", "size");
vc_add_param("vc_button", array('type' => 'dropdown', 'heading' => __('Size', THEME_NAME), 'param_name' => 'size', 'value' => array('Regular size' => '', 'Large' => 'btn-lg', 'Small' => 'btn-sm', 'Mini' => 'btn-xs'), 'description' => __('Button size.', THEME_NAME)));
vc_remove_param("vc_button", "icon");
vc_remove_param("vc_cta_button", "icon");
vc_remove_param("vc_cta_button", "color");
vc_add_param("vc_cta_button", array('type' => 'dropdown', 'heading' => __('Color', THEME_NAME), 'param_name' => 'color', 'value' => array('Outline 1' => 'btn-default', 'Outline 2' => 'btn-white', 'Highlight color' => 'btn-color', 'Background color' => 'btn-dark'), 'description' => __('Button color.', THEME_NAME), 'param_holder_class' => 'vc_colored-dropdown'));
vc_remove_param("vc_cta_button", "size");
vc_add_param("vc_cta_button", array('type' => 'dropdown', 'heading' => __('Size', THEME_NAME), 'param_name' => 'size', 'value' => array('Regular size' => '', 'Large' => 'btn-lg', 'Small' => 'btn-sm', 'Mini' => 'btn-xs'), 'description' => __('Button size.', THEME_NAME)));
// vc_remove_element("vc_gallery");
vc_remove_element("vc_button2");
vc_remove_element("vc_cta_button2");
vc_remove_element("vc_posts_slider");
vc_remove_element("vc_carousel");
}
function removeElements()
{
if (defined('WPB_VC_VERSION')) {
vc_remove_element("vc_facebook");
vc_remove_element("vc_tweetmeme");
vc_remove_element("vc_googleplus");
vc_remove_element("vc_pinterest");
vc_remove_element("vc_images_carousel");
示例13: vc_add_param
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => "Video background (mp4)", "param_name" => "bg_video_src_mp4", "value" => "", "description" => "You must include the ogv & the mp4 format to render your video with cross browser compatibility. OGV is optional. Video must be in a 16:9 aspect ratio. The row background image will be used in mobile devices."));
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => "Video background (ogv)", "param_name" => "bg_video_src_ogv", "value" => ""));
vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => "Video background (webm)", "param_name" => "bg_video_src_webm", "value" => ""));
vc_add_param("vc_row", array("type" => "colorpicker", "class" => "", "heading" => "Video Overlay Color", "param_name" => "bg_video_overlay_color", "value" => "", "description" => "If you want, you can select an overlay color."));
// Add / Remove parameters
vc_remove_param("vc_row", "full_width");
vc_remove_param("vc_row", "parallax");
vc_remove_param("vc_tta_tabs", "style");
vc_remove_param("vc_tta_tabs", "shape");
vc_remove_param("vc_tta_tabs", "color");
vc_remove_param("vc_tta_tabs", "no_fill_content_area");
vc_remove_param("vc_tta_tabs", "spacing");
vc_remove_param("vc_tta_tabs", "gap");
vc_remove_param("vc_tta_tabs", "alignment");
vc_remove_param("vc_tta_tabs", "pagination_color");
vc_remove_param("vc_tta_tabs", "pagination_style");
// Banner shortcode
vc_map(array("name" => __("Banner", THB_THEME_NAME), "base" => "thb_banner", "icon" => "thb_vc_ico_banner", "class" => "thb_vc_sc_banner", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => "Select Background Image", "param_name" => "banner_bg", "description" => ""), array("type" => "textfield", "heading" => "Banner Height", "param_name" => "banner_height", "description" => "Enter height of the banner in px."), array("type" => "dropdown", "class" => "", "heading" => "Banner Effect", "param_name" => "type", "value" => array("Lily" => "effect-lily", "Sadie" => "effect-sadie", "Honey" => "effect-honey", "layla" => "effect-layla", "Marley" => "effect-marley", "Ruby" => "effect-ruby", "Roxy" => "effect-roxy", "Bubba" => "effect-bubba", "Romeo" => "effect-romeo", "Dexter" => "effect-dexter", "Sarah" => "effect-sarah", "Chico" => "effect-chico", "Milo" => "effect-milo"), "description" => "You can see the effects here: http://themes.fuelthemes.net/skillful/banners/"), array("type" => "textfield", "heading" => "Title", "param_name" => "title", "admin_label" => true), array("type" => "textfield", "heading" => "Sub Title", "param_name" => "subtitle"), array("type" => "textfield", "heading" => "Link", "param_name" => "overlay_link")), "description" => "Display different banner styles"));
// Button shortcode
vc_map(array("name" => __("Button", THB_THEME_NAME), "base" => "thb_button", "icon" => "thb_vc_ico_button", "class" => "thb_vc_sc_button", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => "Caption", "admin_label" => true, "param_name" => "content", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => "Link URL", "param_name" => "link", "value" => "", "description" => ""), array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'description' => __('Select icon from library.', 'js_composer')), array("type" => "dropdown", "class" => "", "heading" => "Open link in", "param_name" => "target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Size", "param_name" => "size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "large"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Button color", "param_name" => "color", "value" => array("Accent Color" => "accent", "Black" => "black", "White" => "white"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => "")), "description" => "Add an animated button"));
// Divider Shortcode
vc_map(array("name" => __("Dividers", THB_THEME_NAME), "base" => "thb_dividers", "icon" => "thb_vc_ico_dividers", "class" => "thb_vc_sc_dividers", "category" => "by Fuel Themes", "show_settings_on_create" => true, "params" => array(array("type" => "dropdown", "heading" => "Style", "param_name" => "style", "admin_label" => true, "value" => array('Style 1' => "style1", 'Style 2' => "style2", 'Style 3' => "style3", 'Style 4' => "style4", 'Style 5' => "style5", 'Style 6' => "style6", 'Style 7' => "style7", 'Style 8' => "style8"), "description" => "This changes the style of the dividers")), "description" => "Divide your content with different divider styles."));
// Gap shortcode
vc_map(array("name" => __("Gap", THB_THEME_NAME), "base" => "thb_gap", "icon" => "thb_vc_ico_gap", "class" => "thb_vc_sc_gap", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => "Gap Height", "param_name" => "height", "admin_label" => true, "description" => "Enter height of the gap in px.")), "description" => "Add a gap to seperate elements"));
// Icon List shortcode
vc_map(array("name" => __("Icon List", THB_THEME_NAME), "base" => "thb_iconlist", "icon" => "thb_vc_ico_iconlist", "class" => "thb_vc_sc_iconlist", "category" => "by Fuel Themes", "params" => array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'description' => __('Select icon from library.', 'js_composer')), array("type" => "colorpicker", "class" => "", "heading" => "Icon color", "param_name" => "color", "value" => "", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "exploded_textarea", "class" => "", "heading" => "List Items", "admin_label" => true, "param_name" => "content", "value" => "", "description" => "Every new line will be treated as a list item")), "description" => "Add lists with icons"));
// Iconbox shortcode
vc_map(array("name" => __("Iconbox", THB_THEME_NAME), "base" => "thb_iconbox", "icon" => "thb_vc_ico_iconbox", "class" => "thb_vc_sc_iconbox", "category" => "by Fuel Themes", "params" => array(array('type' => 'iconpicker', 'heading' => __('Icon', 'js_composer'), 'param_name' => 'icon', 'value' => 'fa fa-adjust', 'settings' => array('emptyIcon' => false, 'iconsPerPage' => 4000), 'description' => __('Select icon from library.', 'js_composer')), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => "Icon Color", "param_name" => "icon_color", "description" => ""), array("type" => "attach_image", "class" => "", "heading" => "Image", "param_name" => "image", "description" => "Use image instead of icon? Image uploaded should be 100*100"), array("type" => "textfield", "class" => "", "heading" => "Heading", "param_name" => "heading", "value" => "", "admin_label" => true, "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => "Heading Color", "param_name" => "heading_color", "value" => "", "description" => "You can change the heading color from here"), array("type" => "textarea", "class" => "", "heading" => "Content", "param_name" => "content", "value" => "", "description" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => "Content Color", "param_name" => "content_color", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "checkbox", "class" => "", "heading" => "Add Button?", "param_name" => "use_btn", "value" => array("" => "true"), "description" => "Check if you want to add a button."), array("type" => "textfield", "class" => "", "heading" => "Button Caption", "param_name" => "btn_content", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "textfield", "class" => "", "heading" => "Button Link URL", "param_name" => "btn_link", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Icon", "param_name" => "btn_icon", "value" => thb_getIconArray(), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Open link in", "param_name" => "btn_target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Size", "param_name" => "btn_size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "big"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button Style", "param_name" => "btn_style", "value" => array("Fill" => "", "Outline" => "outline"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => "Button color", "param_name" => "btn_color", "value" => array("Accent" => "accent", "Black" => "black", "White" => "white"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true))), "description" => "Iconboxes with different animations"));
// Image shortcode
vc_map(array("name" => "Image", "base" => "thb_image", "icon" => "thb_vc_ico_image", "class" => "thb_vc_sc_image", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => "Select Image", "param_name" => "image", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => "Animation", "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "textfield", "heading" => "Image size", "param_name" => "img_size", "description" => "Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use 'thumbnail' size."), array("type" => "dropdown", "heading" => "Image alignment", "param_name" => "alignment", "value" => array("Align left" => "left", "Align right" => "right", "Align center" => "center"), "description" => "Select image alignment."), array("type" => "checkbox", "class" => "", "heading" => "Link to Full-Width Image?", "param_name" => "lightbox", "value" => array("" => "true")), array("type" => "vc_link", "heading" => "Image link", "param_name" => "img_link", "description" => "Enter url if you want this image to have link.", "dependency" => array('element' => "lightbox", 'is_empty' => true))), "description" => "Add an animated image"));
// Image Slider
示例14: vc_remove_param
vc_remove_param('vc_separator', 'accent_color');
vc_remove_param('vc_separator', 'el_width');
vc_remove_param('vc_separator', 'align');
vc_remove_param('vc_column_text', 'css_animation');
vc_remove_param('vc_gmaps', 'title');
vc_remove_param('vc_progress_bar', 'title');
vc_remove_param('vc_progress_bar', 'bgcolor');
vc_remove_param('vc_progress_bar', 'custombgcolor');
vc_remove_param('vc_progress_bar', 'options');
vc_remove_element('vc_button');
vc_remove_element('vc_button2');
vc_remove_element('vc_cta_button');
vc_remove_element('vc_cta_button2');
if (defined('WPCF7_VERSION')) {
// contact form 7
vc_remove_param('contact-form-7', 'title');
}
}
/* Disable front end editor */
if (function_exists('vc_disable_frontend')) {
vc_disable_frontend();
}
if (!function_exists('single_file_settings_field')) {
/**
* We will create a custom attribute for videos & images
*/
function single_file_settings_field($settings, $value)
{
$output = '<div class="single_file_block">';
$output .= '<input type="text" class="wpb_vc_param_value wpb-textinput ' . $settings['param_name'] . ' ' . $settings['type'] . '_field" name="' . $settings['param_name'] . '" id="" value="' . esc_url($value) . '">';
$output .= '<br><br>';
示例15: str_replace
{
$class_string = str_replace(array(' vc_row-fluid', ' column_container', ' wpb_column', 'wpb_row'), array(null, null, null, 'ewf-row'), $class_string);
$class_string = str_replace('wpb_wrapper', 'ewf-wrapper', $class_string);
$class_string = preg_replace('/vc_span(\\d{1,2})/', 'ewf-span$1', $class_string);
return $class_string;
}
# Removing animations setting from default composer components
#
$composer_version = explode('.', WPB_VC_VERSION);
// 4.3.2
$composer_current = $composer_version[0] . '.' . $composer_version[1];
// 4.3
$composer_shortcodes = array('4.2' => array('vc_column_text', 'vc_message', 'vc_toggle', 'vc_single_image'), '4.3' => array('vc_column_text', 'vc_message', 'vc_toggle', 'vc_single_image', 'vc_cta_button'), '4.4' => array('vc_column_text', 'vc_message', 'vc_toggle', 'vc_single_image', 'vc_icon', 'vc_cta_button'));
if (!empty($composer_shortcodes[$composer_current])) {
foreach ($composer_shortcodes[$composer_current] as $shortcode_name) {
vc_remove_param($shortcode_name, 'css_animation');
}
}
# Remove unstyled components
#
// vc_remove_element("vc_flickr");
// vc_remove_element("vc_gallery");
// vc_remove_element("vc_images_carousel");
vc_remove_element("vc_wp_search");
vc_remove_element("vc_wp_meta");
vc_remove_element("vc_wp_calendar");
vc_remove_element("vc_wp_pages");
vc_remove_element("vc_wp_recentcomments");
vc_remove_element("vc_wp_tagcloud");
vc_remove_element("vc_wp_custommenu");
vc_remove_element("vc_wp_text");