本文整理汇总了PHP中vc_map_update函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_map_update函数的具体用法?PHP vc_map_update怎么用?PHP vc_map_update使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_map_update函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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')));
}
开发者ID:Zsolt-R,项目名称:wps-prime,代码行数:32,代码来源:wps-vc-column-inner.php
示例2: add_media_center_vc_params
function add_media_center_vc_params()
{
// Apply updtes to default VC elements using add param function
// ===============================================================
if (function_exists('vc_add_param')) {
// Add custom row options
// ===============================================================
// Add parameters to 'vc_row'
$base = 'vc_row';
$extraParams = array(array('type' => 'checkbox', 'param_name' => 'has_container', 'value' => array(__('Has Container ?', 'media_center') => 'true'), 'description' => __('Wrap the row element with container.', 'media_center')), array('type' => 'dropdown', 'heading' => __('Container Class', 'media_center'), 'param_name' => 'container_class', 'value' => array(__('Container', 'media_center') => 'container', __('Container Fluid', 'media_center') => 'container-fluid'), 'description' => __('Specify the class for the container. Will be applied only if has container is set to true.', 'media_center')), array('type' => 'dropdown', 'heading' => __('CSS3 Animation', 'media_center'), 'param_name' => 'row_animation', 'value' => array(__('No Animation', 'media_center') => 'none', __('BounceIn', 'media_center') => 'bounceIn', __('BounceInDown', 'media_center') => 'bounceInDown', __('BounceInLeft', 'media_center') => 'bounceInLeft', __('BounceInRight', 'media_center') => 'bounceInRight', __('BounceInUp', 'media_center') => 'bounceInUp', __('FadeIn', 'media_center') => 'fadeIn', __('FadeInDown', 'media_center') => 'fadeInDown', __('FadeInDown Big', 'media_center') => 'fadeInDownBig', __('FadeInLeft', 'media_center') => 'fadeInLeft', __('FadeInLeft Big', 'media_center') => 'fadeInLeftBig', __('FadeInRight', 'media_center') => 'fadeInRight', __('FadeInRight Big', 'media_center') => 'fadeInRightBig', __('FadeInUp', 'media_center') => 'fadeInUp', __('FadeInUp Big', 'media_center') => 'fadeInUpBig', __('FlipInX', 'media_center') => 'flipInX', __('FlipInY', 'media_center') => 'flipInY', __('Light SpeedIn', 'media_center') => 'lightSpeedIn', __('RotateIn', 'media_center') => 'rotateIn', __('RotateInDown Left', 'media_center') => 'rotateInDownLeft', __('RotateInDown Right', 'media_center') => 'rotateInDownRight', __('RotateInUp Left', 'media_center') => 'rotateInUpLeft', __('RotateInUp Right', 'media_center') => 'rotateInUpRight', __('RoleIn', 'media_center') => 'roleIn', __('ZoomIn', 'media_center') => 'zoomIn', __('ZoomInDown', 'media_center') => 'zoomInDown', __('ZoomInLeft', 'media_center') => 'zoomInLeft', __('ZoomInRight', 'media_center') => 'zoomInRight', __('ZoomInUp', 'media_center') => 'zoomInUp'), 'description' => __('Choose the animation effect on the row when scrolled into view.', 'media_center')));
foreach ($extraParams as $params) {
vc_add_param($base, $params);
}
// Update 'vc_row' to include custom shortcode template and re-map shortcode
vc_map_update('vc_row');
//Add parameters to vc_accordion
$base = 'vc_accordion';
$extraParams = array(array('type' => 'dropdown', 'param_name' => 'accordion_style', 'value' => array(__('Style 1', 'media_center') => 'style-1', __('Style 2', 'media_center') => 'style-2')));
foreach ($extraParams as $params) {
vc_add_param($base, $params);
}
// Update 'vc_row' to include custom shortcode template and re-map shortcode
vc_map_update('vc_accordion');
}
}
开发者ID:Qualitair,项目名称:ecommerce,代码行数:25,代码来源:custom_vc.php
示例3: 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')));
}
开发者ID:Zsolt-R,项目名称:wps-prime,代码行数:7,代码来源:wps-vc-column-text.php
示例4: om_wpb_sort_elements
/**
* Sort WPB Elements
*/
function om_wpb_sort_elements()
{
$elements = array('vc_row', 'vc_column_text', 'vc_separator', 'vc_text_separator', 'om_icon_separator', 'vc_message', 'vc_facebook', 'vc_tweetmeme', 'vc_googleplus', 'vc_pinterest', 'vc_toggle', 'vc_single_image', 'vc_gallery', 'vc_images_carousel', 'vc_tabs', 'vc_tour', 'vc_accordion', 'vc_btn', 'vc_cta', 'vc_icon', 'vc_video', 'vc_gmaps', 'vc_raw_html', 'vc_raw_js', 'vc_flickr', 'vc_progress_bar', 'vc_pie', 'vc_empty_space', 'vc_custom_heading', 'om_box', 'om_counter', 'om_a_button', 'om_pricing_table', 'om_pricing_table_column', 'om_html_table', 'om_posts', 'om_testimonials', 'om_portfolio', 'om_logos', 'om_chart', 'om_person', 'om_click_box', 'om_moving_box', 'om_click_icon_box', 'om_click_icon_box2', 'om_teaser');
$elements = array_reverse($elements);
$w = 10;
foreach ($elements as $v) {
if (WPBMap::exists($v)) {
vc_map_update($v, array('weight' => $w));
$w += 10;
}
}
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:15,代码来源:modifications.php
示例5: 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')));
}
开发者ID:Zsolt-R,项目名称:wps-prime,代码行数:24,代码来源:wps-vc-row-inner.php
示例6: vc_add_param
),
"description" => ""
));
// add custom color selector
vc_add_param("vc_pie", array(
"type" => "colorpicker",
"heading" => __("Bar color", LANGUAGE_ZONE),
"param_name" => "color",
"value" => '#f7f7f7',
"description" => ""
));
//***********************************************************************
// Carousel
//***********************************************************************
vc_remove_param('vc_carousel', 'mode');
//////////////////
// VC Separator //
//////////////////
vc_map_update( 'vc_separator', array( "name" => __("Separator (deprecated)", LANGUAGE_ZONE), "category" => __('Deprecated', LANGUAGE_ZONE), "weight" => -1 ) );
///////////////////////
// VC Text Separator //
///////////////////////
vc_map_update( 'vc_text_separator', array( "name" => __("Separator with Text (deprecated)", LANGUAGE_ZONE), "category" => __('Deprecated', LANGUAGE_ZONE), "weight" => -1 ) );
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:30,代码来源:js_composer_bridge.php
示例7: array
// [vc_button2]
$setting = array('name' => 'Button', 'category' => 'Content');
vc_map_update('vc_button2', $setting);
vc_remove_param("vc_button2", "style");
vc_add_param("vc_button2", array("type" => "dropdown", "class" => "", "heading" => "Style", "param_name" => "style", "value" => array("Square" => "square", "Square Outlined" => "square_outlined")));
vc_add_param("vc_button2", array("type" => "dropdown", "class" => "", "heading" => "Align", "param_name" => "align", "value" => array("Left" => "left", "Center" => "center", "Right" => "right")));
// [vc_widget_sidebar]
$setting = array('category' => 'Content');
vc_map_update('vc_widget_sidebar', $setting);
vc_remove_param("vc_widget_sidebar", "title");
// [vc_raw_html]
$setting = array('category' => 'Content');
vc_map_update('vc_raw_html', $setting);
// [vc_raw_js]
$setting = array('category' => 'Content');
vc_map_update('vc_raw_js', $setting);
// [vc_single_image]
vc_remove_param("vc_single_image", "title");
// [vc_gallery]
/*vc_remove_param("vc_gallery", "title");
vc_remove_param("vc_gallery", "type");
vc_remove_param("vc_gallery", "interval");*/
// [vc_message]
vc_remove_param("vc_message", "style");
// [vc_gmaps]
vc_remove_param("vc_gmaps", "title");
// [vc_accordion]
vc_remove_param("vc_accordion", "title");
// [vc_progress_bar]
vc_remove_param("vc_progress_bar", "title");
vc_remove_param("vc_progress_bar", "options");
开发者ID:apeachdev,项目名称:eyeboutique,代码行数:31,代码来源:custom_vc.php
示例8: vc_map
vc_map(array("name" => "Featured products", "base" => "featured_products", "icon" => "icon-wpb-featured_products", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "params" => array(array("type" => "textfield", "holder" => "div", "class" => "", "heading" => "Per Page", "param_name" => "per_page", "value" => "12"), array("type" => "textfield", "holder" => "div", "class" => "", "heading" => "Columns", "param_name" => "columns", "value" => "4"), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => "Order By", "param_name" => "order_by", "value" => array("Date" => "date", "Title" => "title"), 'save_always' => true, "description" => ""), array("type" => "dropdown", "holder" => "div", "class" => "", "heading" => "Order", "param_name" => "order", "value" => array("DESC" => "desc", "ASC" => "asc"), 'save_always' => true, "description" => ""))));
/**** Shop Messages ***/
vc_map(array("name" => "Shop Messages", "base" => "woocommerce_messages", "icon" => "icon-wpb-woocommerce_messages", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** Cart ***/
vc_map(array("name" => "Pages - Cart", "base" => "woocommerce_cart", "icon" => "icon-wpb-woocommerce_cart", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** Checkout ***/
vc_map(array("name" => "Pages - Checkout", "base" => "woocommerce_checkout", "icon" => "icon-wpb-woocommerce_checkout", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** My Account ***/
vc_map(array("name" => "Pages - My Account", "base" => "woocommerce_my_account", "icon" => "icon-wpb-woocommerce_my_account", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** Edit Address ***/
vc_map(array("name" => "Pages - Edit Address", "base" => "woocommerce_edit_address", "icon" => "icon-wpb-woocommerce_edit_address", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** Change Password ***/
vc_map(array("name" => "Pages - Change Password", "base" => "woocommerce_change_password", "icon" => "icon-wpb-woocommerce_change_password", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** View Order ***/
vc_map(array("name" => "Pages - View Order", "base" => "woocommerce_view_order", "icon" => "icon-wpb-woocommerce_view_order", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** Pay ***/
vc_map(array("name" => "Pages - Pay", "base" => "woocommerce_pay", "icon" => "icon-wpb-woocommerce_pay", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
/**** Thankyou ***/
vc_map(array("name" => "Pages - Thankyou", "base" => "woocommerce_thankyou", "icon" => "icon-wpb-woocommerce_thankyou", "category" => 'Woocommerce', "allowed_container_element" => 'vc_row', "show_settings_on_create" => false));
}
/*** Contact Form 7 ***/
if (qode_contact_form_7_installed()) {
vc_add_param("contact-form-7", array("type" => "dropdown", "class" => "", "heading" => "Style", "param_name" => "html_class", "value" => array("Default" => "default", "Custom Style 1" => "cf7_custom_style_1", "Custom Style 2" => "cf7_custom_style_2", "Custom Style 3" => "cf7_custom_style_3"), 'save_always' => true, "description" => "You can style each form element individually in Qode Options > Contact Form 7"));
}
/*** Restore Tabs&Accordion from Deprecated category ***/
$vc_map_deprecated_settings = array('deprecated' => false, 'category' => __('Content', 'js_composer'));
vc_map_update('vc_accordion', $vc_map_deprecated_settings);
vc_map_update('vc_tabs', $vc_map_deprecated_settings);
vc_map_update('vc_tab', array('deprecated' => false));
vc_map_update('vc_accordion_tab', array('deprecated' => false));
开发者ID:ranrolls,项目名称:refine-mix-all,代码行数:30,代码来源:extend-vc.php
示例9: array
#####################################################################################*/
$toggle_setting = array('allowed_container_element' => 'vc_tabs');
if (function_exists('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');
开发者ID:javalidigital,项目名称:multipla,代码行数:31,代码来源:vc-xtend.php
示例10: vc_add_param
vc_add_param("vc_row_inner", array("type" => "colorpicker", "class" => "", "heading" => "Background color", "param_name" => "background_color", "value" => "", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('row', 'expandable'))));
vc_add_param("vc_row_inner", array("type" => "attach_image", "class" => "", "heading" => "Background image", "value" => "", "param_name" => "background_image", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('parallax'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "class" => "", "heading" => "Section height", "param_name" => "section_height", "value" => "", "dependency" => array('element' => "row_type", 'value' => array('parallax'))));
vc_add_param("vc_row_inner", array("type" => "colorpicker", "class" => "", "heading" => "Border color", "param_name" => "border_color", "value" => "", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('row', 'expandable'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "class" => "", "heading" => "Padding", "value" => "", "param_name" => "padding", "description" => "Padding (left/right in % - full width only)", "dependency" => array('element' => "type", 'value' => array('full_width'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "class" => "", "heading" => "Padding Top", "value" => "", "param_name" => "padding_top", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('row'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "class" => "", "heading" => "Padding Bottom", "value" => "", "param_name" => "padding_bottom", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('row'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "class" => "", "heading" => "More Button Label", "param_name" => "more_button_label", "value" => "", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('expandable'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "class" => "", "heading" => "Less Button Label", "param_name" => "less_button_label", "value" => "", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('expandable'))));
vc_add_param("vc_row_inner", array("type" => "dropdown", "class" => "", "heading" => "Button Position", "param_name" => "button_position", "value" => array("" => "", "Left" => "left", "Right" => "right", "Center" => "center"), "description" => "", "dependency" => array('element' => "row_type", 'value' => array('expandable'))));
vc_add_param("vc_row_inner", array("type" => "colorpicker", "class" => "", "heading" => "Color", "param_name" => "color", "value" => "", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('expandable'))));
vc_add_param("vc_row_inner", array("type" => "dropdown", "heading" => "CSS Animation", "param_name" => "css_animation", "admin_label" => true, "value" => $animations, "description" => "", "dependency" => array('element' => "row_type", 'value' => array('row'))));
vc_add_param("vc_row_inner", array("type" => "textfield", "heading" => "Transition delay (ms)", "param_name" => "transition_delay", "admin_label" => true, "value" => "", "description" => "", "dependency" => array('element' => "row_type", 'value' => array('row'))));
/*** Separator ***/
$separator_setting = array('show_settings_on_create' => true, "controls" => '');
vc_map_update('vc_separator', $separator_setting);
vc_add_param("vc_separator", array("type" => "dropdown", "class" => "", "heading" => "Type", "param_name" => "type", "value" => array("Normal" => "normal", "Transparent" => "transparent", "Small" => "small"), "description" => ""));
vc_add_param("vc_separator", array("type" => "dropdown", "class" => "", "heading" => "Position", "param_name" => "position", "value" => array("Center" => "center", "Left" => "left", "Right" => "right"), "dependency" => array("element" => "type", "value" => array("small")), "description" => ""));
vc_add_param("vc_separator", array("type" => "colorpicker", "class" => "", "heading" => "Color", "param_name" => "color", "value" => "", "dependency" => array("element" => "type", "value" => array("normal", "small")), "description" => ""));
vc_add_param("vc_separator", array("type" => "textfield", "class" => "", "heading" => "Transparency", "param_name" => "transparency", "value" => "", "dependency" => array("element" => "type", "value" => array("normal", "small")), "description" => "Value should be between 0 and 1"));
vc_add_param("vc_separator", array("type" => "textfield", "class" => "", "heading" => "Thickness", "param_name" => "thickness", "value" => "", "description" => ""));
vc_add_param("vc_separator", array("type" => "textfield", "class" => "", "heading" => "Width", "param_name" => "width", "value" => "", "dependency" => array("element" => "type", "value" => array("small")), "description" => ""));
vc_add_param("vc_separator", array("type" => "checkbox", "class" => "", "heading" => "", "value" => array("Width In Percentages?" => "yes"), "param_name" => "width_in_percentages", "dependency" => array('element' => 'width', 'not_empty' => true)));
vc_add_param("vc_separator", array("type" => "textfield", "class" => "", "heading" => "Top Margin", "param_name" => "up", "value" => "", "description" => ""));
vc_add_param("vc_separator", array("type" => "textfield", "class" => "", "heading" => "Bottom Margin", "param_name" => "down", "value" => "", "description" => ""));
/*** Separator With Text ***/
vc_add_param("vc_text_separator", array("type" => "dropdown", "class" => "", "heading" => "Border", "param_name" => "border", "value" => array("No" => "no", "Yes" => "yes")));
vc_add_param("vc_text_separator", array("type" => "colorpicker", "class" => "", "heading" => "Border Color", "param_name" => "border_color", "dependency" => array('element' => "border", 'value' => array('yes'))));
vc_add_param("vc_text_separator", array("type" => "colorpicker", "class" => "", "heading" => "Background Color", "param_name" => "background_color"));
vc_add_param("vc_text_separator", array("type" => "colorpicker", "class" => "", "heading" => "Title Color", "param_name" => "title_color"));
/*** Single Image ***/
开发者ID:shiyoi,项目名称:workplanhp,代码行数:31,代码来源:extend-vc.php
示例11: etheme_VS_setup
//.........这里部分代码省略.........
// ! Register New Element: Single post
// **********************************************************************//
$fpost_params = array('name' => 'Single blog post', 'base' => 'single_post', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "textfield", "heading" => __("Post ID", ETHEME_DOMAIN), "param_name" => "id"), array("type" => "dropdown", "heading" => __("Show more posts link", ETHEME_DOMAIN), "param_name" => "more_posts", "value" => array("", __("Show", ETHEME_DOMAIN) => 1, __("Hide", ETHEME_DOMAIN) => 0)), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN))));
vc_map($fpost_params);
// **********************************************************************//
// ! Register New Element: Teaser Box
// **********************************************************************//
$teaser_box_params = array('name' => 'Teaser Box', 'base' => 'teaser_box', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array('type' => 'attach_image', "heading" => __("Image", ETHEME_DOMAIN), "param_name" => "img"), array("type" => "textfield", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "description" => __("Enter image size. Example in pixels: 200x100 (Width x Height).", "js_composer")), array("type" => "textarea_html", 'admin_label' => true, "heading" => __("Text", "js_composer"), "param_name" => "content", "value" => __("Click edit button to change this text.", "js_composer"), "description" => __("Enter your content.", "js_composer")), array("type" => "dropdown", "heading" => __("Style", ETHEME_DOMAIN), "param_name" => "style", "value" => array(__("Default", ETHEME_DOMAIN) => 'default', __("Bordered", ETHEME_DOMAIN) => 'bordered')), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN))));
vc_map($teaser_box_params);
// **********************************************************************//
// ! Register New Element: Products
// **********************************************************************//
$static_blocks = array('--choose--' => '');
foreach (et_get_static_blocks() as $value) {
$static_blocks[$value['label']] = $value['value'];
}
$fpost_params = array('name' => 'Products', 'base' => 'etheme_products', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "textfield", "heading" => __("IDs", ETHEME_DOMAIN), "param_name" => "ids"), array("type" => "textfield", "heading" => __("SKUs", ETHEME_DOMAIN), "param_name" => "skus"), array("type" => "dropdown", "heading" => __("Display Type", ETHEME_DOMAIN), "param_name" => "type", "value" => array(__("Slider", ETHEME_DOMAIN) => 'slider', __("Slider full width (LOOK BOOK)", ETHEME_DOMAIN) => 'full-width', __("Grid", ETHEME_DOMAIN) => 'grid')), array("type" => "dropdown", "dependency" => array('element' => "type", 'value' => array('full-width')), "heading" => __("Static block for the first slide of the LOOK BOOK", ETHEME_DOMAIN), "param_name" => "block_id", "value" => $static_blocks), array("type" => "textfield", "heading" => __("Columns", ETHEME_DOMAIN), "param_name" => "columns", "dependency" => array('element' => "type", 'value' => array('grid'))), array("type" => "dropdown", "heading" => __("Product view", ETHEME_DOMAIN), "param_name" => "style", "dependency" => array('element' => "type", 'value' => array('slider')), "value" => array(__("Default", ETHEME_DOMAIN) => 'default', __("Advanced", ETHEME_DOMAIN) => 'advanced')), array("type" => "textfield", "heading" => __("Number of items on desktop", ETHEME_DOMAIN), "param_name" => "desktop", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "textfield", "heading" => __("Number of items on notebook", ETHEME_DOMAIN), "param_name" => "notebook", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "textfield", "heading" => __("Number of items on tablet", ETHEME_DOMAIN), "param_name" => "tablet", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "textfield", "heading" => __("Number of items on phones", ETHEME_DOMAIN), "param_name" => "phones", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "dropdown", "heading" => __("Products type", ETHEME_DOMAIN), "param_name" => "products", "value" => array(__("All", ETHEME_DOMAIN) => '', __("Featured", ETHEME_DOMAIN) => 'featured', __("New", ETHEME_DOMAIN) => 'new', __("Sale", ETHEME_DOMAIN) => 'sale', __("Recently viewed", ETHEME_DOMAIN) => 'recently_viewed', __("Bestsellings", ETHEME_DOMAIN) => 'bestsellings')), array("type" => "textfield", "heading" => __("Limit", ETHEME_DOMAIN), "param_name" => "limit"), array("type" => "textfield", "heading" => __("Categories IDs", ETHEME_DOMAIN), "param_name" => "categories")));
vc_map($fpost_params);
$vc_is_wp_version_3_6_more = version_compare(preg_replace('/^([\\d\\.]+)(\\-.*$)/', '$1', get_bloginfo('version')), '3.6') >= 0;
// Used in "Button", "Call to Action", "Pie chart" blocks
$colors_arr = array(__("Grey", "js_composer") => "wpb_button", __("Blue", "js_composer") => "btn-primary", __("Turquoise", "js_composer") => "btn-info", __("Green", "js_composer") => "btn-success", __("Orange", "js_composer") => "btn-warning", __("Red", "js_composer") => "btn-danger", __("Black", "js_composer") => "btn-inverse");
// Used in "Button" and "Call to Action" blocks
$size_arr = array(__("Regular size", "js_composer") => "wpb_regularsize", __("Large", "js_composer") => "btn-large", __("Small", "js_composer") => "btn-small", __("Mini", "js_composer") => "btn-mini");
$target_arr = array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank");
$add_css_animation = array("type" => "dropdown", "heading" => __("CSS Animation", "js_composer"), "param_name" => "css_animation", "admin_label" => true, "value" => array(__("No", "js_composer") => '', __("Top to bottom", "js_composer") => "top-to-bottom", __("Bottom to top", "js_composer") => "bottom-to-top", __("Left to right", "js_composer") => "left-to-right", __("Right to left", "js_composer") => "right-to-left", __("Appear from center", "js_composer") => "appear"), "description" => __("Select type of animation if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.", "js_composer"));
// Remove Some Elements
vc_remove_element("vc_text_separator");
vc_remove_element("vc_tour");
vc_remove_element("vc_carousel");
// **********************************************************************//
// ! Row HTML
// **********************************************************************//
$row_params = array('params' => array(array("type" => "colorpicker", "heading" => __('Font Color', 'wpb'), "param_name" => "font_color", "description" => __("Select font color", "wpb"), "edit_field_class" => 'col-md-6'), array("type" => "dropdown", "heading" => __("Full width section", ETHEME_DOMAIN), "param_name" => "full_width", "value" => array("", __("enable", ETHEME_DOMAIN) => 1, __("disable", ETHEME_DOMAIN) => 0)), array("type" => "dropdown", "heading" => __("Color Scheme", ETHEME_DOMAIN), "param_name" => "color_scheme", "value" => array("", __("light with black text", ETHEME_DOMAIN) => 'light', __("dark with white text", ETHEME_DOMAIN) => 'dark'), "dependency" => array('element' => "full_width", 'value' => array('1'))), array("type" => "textfield", "heading" => __("Video URL (mp4)", "js_composer"), "param_name" => "video_mp4", "dependency" => array('element' => "full_width", 'value' => array('1'))), array("type" => "textfield", "heading" => __("Video URL (webm)", "js_composer"), "param_name" => "video_webm", "dependency" => array('element' => "full_width", 'value' => array('1'))), array("type" => "textfield", "heading" => __("Video URL (ogv)", "js_composer"), "param_name" => "video_ogv", "dependency" => array('element' => "full_width", 'value' => array('1'))), array("type" => "attach_image", "heading" => __("Video poster image", "js_composer"), "param_name" => "video_poster", "dependency" => array('element' => "full_width", 'value' => array('1'))), array("type" => "dropdown", "heading" => __("Parallax effect for background", ETHEME_DOMAIN), "param_name" => "parallax", "value" => array("", __("enable", ETHEME_DOMAIN) => 1, __("disable", ETHEME_DOMAIN) => 0), "dependency" => array('element' => "full_width", 'value' => array('1'))), 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 for section', "js_composer"), "param_name" => "css_outer", "group" => __('Design options', 'js_composer'), "dependency" => array('element' => "full_width", 'value' => array('1'))), array("type" => "css_editor", "heading" => __('Css', "js_composer"), "param_name" => "css", "group" => __('Design options', 'js_composer'))));
vc_map_update('vc_row', $row_params);
function vc_theme_vc_row($atts, $content = null)
{
$output = $section_class = $el_class = $video = $bg_image = $bg_color = $full_width = $bg_image_repeat = $font_color = $padding =
|
请发表评论