当前位置: 首页>>代码示例>>PHP>>正文


PHP vc_map_update函数代码示例

本文整理汇总了PHP中vc_map_update函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_map_update函数的具体用法?PHP vc_map_update怎么用?PHP vc_map_update使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了vc_map_update函数的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')));
}
开发者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 = $margin_bottom = $css = '';
            extract(shortcode_atts(array('el_class' => '', 'full_width' => 0, 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'color_scheme' => '', 'padding' => '', 'margin_bottom' => '', 'parallax' => 0, 'video_poster' => '', 'video_mp4' => '', 'video_webm' => '', 'video_ogv' => '', 'css' => '', 'css_outer' => ''), $atts));
            wp_enqueue_style('js_composer_front');
            wp_enqueue_script('wpb_composer_front_js');
            wp_enqueue_style('js_composer_custom_css');
            $el_class = ' ' . $el_class;
            $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'row-fluid ' . get_row_css_class() . $el_class . vc_shortcode_custom_css_class($css, ' '));
            $style = buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
            if ($full_width) {
                $section_class .= ' color-scheme-' . $color_scheme . ' ';
                if ($parallax) {
                    $section_class .= ' parallax-section';
                }
                if ($video_mp4 != '' || $video_webm != '' || $video_ogv != '') {
                    if ($video_poster != '') {
                        $video_poster = etheme_get_image($video_poster);
                        $video .= '
			                <div class="section-video-poster" style="background-image: url(' . $video_poster . ')"></div>
			            ';
                    }
                    $video .= '
			        <div class="section-back-video hidden-tablet hidden-phone">
			            <video autoplay="autoplay" loop="loop" muted="muted" style="" class="et-section-video">
			                <source src="' . $video_mp4 . '" type="video/mp4">
			                <source src="' . $video_ogv . '" type="video/ogv">
			                <source src="' . $video_webm . '" type="video/webm">
			            </video>
			        </div>
			        <div class="section-video-mask"></div>
			        ';
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:67,代码来源:vc.php

示例12: x_visual_composer_update_existing_shortcodes

 function x_visual_composer_update_existing_shortcodes()
 {
     //
     // [vc_row]
     //
     vc_map_update('vc_row', array('name' => __('Content Band', '__x__'), 'weight' => 1000, 'class' => 'x-content-element x-content-element-content-band', 'icon' => 'content-band', 'category' => __('Structure', '__x__'), 'description' => __('Place and structure your shortcodes inside of a row', '__x__')));
     vc_remove_param('vc_row', 'bg_color');
     vc_remove_param('vc_row', 'font_color');
     vc_remove_param('vc_row', 'padding');
     vc_remove_param('vc_row', 'margin_bottom');
     vc_remove_param('vc_row', 'bg_image');
     vc_remove_param('vc_row', 'bg_image_repeat');
     vc_remove_param('vc_row', 'el_class');
     vc_remove_param('vc_row', 'css');
     vc_remove_param('vc_row', 'full_width');
     vc_remove_param('vc_row', 'full_height');
     vc_remove_param('vc_row', 'content_placement');
     vc_remove_param('vc_row', 'video_bg');
     vc_remove_param('vc_row', 'video_bg_url');
     vc_remove_param('vc_row', 'video_bg_parallax');
     vc_remove_param('vc_row', 'parallax');
     vc_remove_param('vc_row', 'parallax_image');
     vc_remove_param('vc_row', 'el_id');
     vc_add_param('vc_row', array('param_name' => 'inner_container', 'heading' => __('Inner Container', '__x__'), 'description' => __('Select to insert a container inside of the content band. Use this instead of the [container] shortcode for greater flexibility and to contain multiple columns.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row', array('param_name' => 'no_margin', 'heading' => __('Remove Margin', '__x__'), 'description' => __('Select to remove the margin from the content band and stack them on top of each other.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row', array('param_name' => 'padding_top', 'heading' => __('Padding Top', '__x__'), 'description' => __('Set the top padding of the content band (leave blank to keep default).', '__x__'), 'type' => 'textfield', 'holder' => 'div', 'value' => '0px'));
     vc_add_param('vc_row', array('param_name' => 'padding_bottom', 'heading' => __('Padding Bottom', '__x__'), 'description' => __('Set the bottom padding of the content band (leave blank to keep default).', '__x__'), 'type' => 'textfield', 'holder' => 'div', 'value' => '0px'));
     vc_add_param('vc_row', array('param_name' => 'border', 'heading' => __('Border', '__x__'), 'description' => __('Select whether or not to display a border on your content band.', '__x__'), 'type' => 'dropdown', 'holder' => 'div', 'value' => array('- Select Option -' => '', 'None' => 'none', 'Top' => 'top', 'Left' => 'left', 'Right' => 'right', 'Bottom' => 'bottom', 'Horizontal' => 'horizontal', 'Vertical' => 'vertical', 'All' => 'all')));
     vc_add_param('vc_row', array('param_name' => 'bg_color', 'heading' => __('Background Color', '__x__'), 'description' => __('Select the background color of your content band (leave blank for "transparent").', '__x__'), 'type' => 'colorpicker', 'holder' => 'div'));
     vc_add_param('vc_row', array('param_name' => 'bg_pattern', 'heading' => __('Background Pattern', '__x__'), 'description' => __('Upload a background pattern to your content band.', '__x__'), 'type' => 'attach_image', 'holder' => 'div'));
     vc_add_param('vc_row', array('param_name' => 'bg_image', 'heading' => __('Background Image', '__x__'), 'description' => __('Upload a background image to your content band (this will overwrite your Background Pattern).', '__x__'), 'type' => 'attach_image', 'holder' => 'div'));
     vc_add_param('vc_row', array('param_name' => 'parallax', 'heading' => __('Parallax', '__x__'), 'description' => __('Select to activate the parallax effect with background patterns and images.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row', array('param_name' => 'bg_video', 'heading' => __('Background Video', '__x__'), 'description' => __('Include the path to your background video (this will overwrite both your Background Pattern and Background Image).', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_row', array('param_name' => 'bg_video_poster', 'heading' => __('Background Video Poster', '__x__'), 'description' => __('Include a poster image for your background video on mobile devices.', '__x__'), 'type' => 'attach_image', 'holder' => 'div'));
     vc_add_param('vc_row', array('param_name' => 'marginless_columns', 'heading' => __('Marginless Columns', '__x__'), 'description' => __('Select to remove the spacing between columns.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row', array('param_name' => 'class', 'heading' => __('Class', '__x__'), 'description' => __('(Optional) Enter a unique class name.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_row', array('param_name' => 'style', 'heading' => __('Style', '__x__'), 'description' => __('(Optional) Enter inline CSS.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     //
     // [vc_row_inner]
     //
     vc_map_update('vc_row_inner', array('name' => __('Content Band', '__x__'), 'weight' => 1000, 'class' => 'x-content-element x-content-element-content-band', 'icon' => 'content-band', 'category' => __('Structure', '__x__'), 'description' => __('Place and structure your shortcodes inside of a row', '__x__')));
     vc_remove_param('vc_row_inner', 'font_color');
     vc_remove_param('vc_row_inner', 'el_class');
     vc_remove_param('vc_row_inner', 'css');
     vc_remove_param('vc_row_inner', 'el_id');
     vc_add_param('vc_row_inner', array('param_name' => 'inner_container', 'heading' => __('Inner Container', '__x__'), 'description' => __('Select to insert a container inside of the content band. Use this instead of the [container] shortcode for greater flexibility and to contain multiple columns.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row_inner', array('param_name' => 'no_margin', 'heading' => __('Remove Margin', '__x__'), 'description' => __('Select to remove the margin from the content band and stack them on top of each other.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row_inner', array('param_name' => 'padding_top', 'heading' => __('Padding Top', '__x__'), 'description' => __('Set the top padding of the content band (leave blank to keep default).', '__x__'), 'type' => 'textfield', 'holder' => 'div', 'value' => '0px'));
     vc_add_param('vc_row_inner', array('param_name' => 'padding_bottom', 'heading' => __('Padding Bottom', '__x__'), 'description' => __('Set the bottom padding of the content band (leave blank to keep default).', '__x__'), 'type' => 'textfield', 'holder' => 'div', 'value' => '0px'));
     vc_add_param('vc_row_inner', array('param_name' => 'border', 'heading' => __('Border', '__x__'), 'description' => __('Select whether or not to display a border on your content band.', '__x__'), 'type' => 'dropdown', 'holder' => 'div', 'value' => array('- Select Option -' => '', 'None' => 'none', 'Top' => 'top', 'Left' => 'left', 'Right' => 'right', 'Bottom' => 'bottom', 'Horizontal' => 'horizontal', 'Vertical' => 'vertical', 'All' => 'all')));
     vc_add_param('vc_row_inner', array('param_name' => 'bg_color', 'heading' => __('Background Color', '__x__'), 'description' => __('Select the background color of your content band (leave blank for "transparent").', '__x__'), 'type' => 'colorpicker', 'holder' => 'div'));
     vc_add_param('vc_row_inner', array('param_name' => 'bg_pattern', 'heading' => __('Background Pattern', '__x__'), 'description' => __('Upload a background pattern to your content band.', '__x__'), 'type' => 'attach_image', 'holder' => 'div'));
     vc_add_param('vc_row_inner', array('param_name' => 'bg_image', 'heading' => __('Background Image', '__x__'), 'description' => __('Upload a background image to your content band (this will overwrite your Background Pattern).', '__x__'), 'type' => 'attach_image', 'holder' => 'div'));
     vc_add_param('vc_row_inner', array('param_name' => 'parallax', 'heading' => __('Parallax', '__x__'), 'description' => __('Select to activate the parallax effect with background patterns and images.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row_inner', array('param_name' => 'bg_video', 'heading' => __('Background Video', '__x__'), 'description' => __('Include the path to your background video (this will overwrite both your Background Pattern and Background Image).', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_row_inner', array('param_name' => 'bg_video_poster', 'heading' => __('Background Video Poster', '__x__'), 'description' => __('Include a poster image for your background video on mobile devices.', '__x__'), 'type' => 'attach_image', 'holder' => 'div'));
     vc_add_param('vc_row_inner', array('param_name' => 'marginless_columns', 'heading' => __('Marginless Columns', '__x__'), 'description' => __('Select to remove the spacing between columns.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_row_inner', array('param_name' => 'class', 'heading' => __('Class', '__x__'), 'description' => __('(Optional) Enter a unique class name.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_row_inner', array('param_name' => 'style', 'heading' => __('Style', '__x__'), 'description' => __('(Optional) Enter inline CSS.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     //
     // [vc_column]
     //
     vc_remove_param('vc_column', 'width');
     vc_remove_param('vc_column', 'offset');
     vc_remove_param('vc_column', 'font_color');
     vc_remove_param('vc_column', 'el_class');
     vc_remove_param('vc_column', 'css');
     vc_add_param('vc_column', array('param_name' => 'fade', 'heading' => __('Fade Effect', '__x__'), 'description' => __('Select to activate the fade effect.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_column', array('param_name' => 'fade_animation', 'heading' => __('Fade Animation', '__x__'), 'description' => __('Select the type of fade animation you want to use.', '__x__'), 'type' => 'dropdown', 'holder' => 'div', 'value' => array('- Select Option -' => '', 'In' => 'in', 'In From Top' => 'in-from-top', 'In From Left' => 'in-from-left', 'In From Right' => 'in-from-right', 'In From Bottom' => 'in-from-bottom')));
     vc_add_param('vc_column', array('param_name' => 'fade_animation_offset', 'heading' => __('Fade Animation Offset', '__x__'), 'description' => __('Set how large you want the offset for your fade animation to be.', '__x__'), 'type' => 'textfield', 'holder' => 'div', 'value' => '45px'));
     vc_add_param('vc_column', array('param_name' => 'id', 'heading' => __('ID', '__x__'), 'description' => __('(Optional) Enter a unique ID.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_column', array('param_name' => 'class', 'heading' => __('Class', '__x__'), 'description' => __('(Optional) Enter a unique class name.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_column', array('param_name' => 'style', 'heading' => __('Style', '__x__'), 'description' => __('(Optional) Enter inline CSS.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     //
     // [vc_column_inner]
     //
     vc_remove_param('vc_column_inner', 'width');
     vc_remove_param('vc_column_inner', 'font_color');
     vc_remove_param('vc_column_inner', 'el_class');
     vc_remove_param('vc_column_inner', 'css');
     vc_add_param('vc_column_inner', array('param_name' => 'fade', 'heading' => __('Fade Effect', '__x__'), 'description' => __('Select to activate the fade effect.', '__x__'), 'type' => 'checkbox', 'holder' => 'div', 'value' => array('' => 'true')));
     vc_add_param('vc_column_inner', array('param_name' => 'fade_animation', 'heading' => __('Fade Animation', '__x__'), 'description' => __('Select the type of fade animation you want to use.', '__x__'), 'type' => 'dropdown', 'holder' => 'div', 'value' => array('- Select Option -' => '', 'In' => 'in', 'In From Top' => 'in-from-top', 'In From Left' => 'in-from-left', 'In From Right' => 'in-from-right', 'In From Bottom' => 'in-from-bottom')));
     vc_add_param('vc_column_inner', array('param_name' => 'fade_animation_offset', 'heading' => __('Fade Animation Offset', '__x__'), 'description' => __('Set how large you want the offset for your fade animation to be.', '__x__'), 'type' => 'textfield', 'holder' => 'div', 'value' => '45px'));
     vc_add_param('vc_column_inner', array('param_name' => 'id', 'heading' => __('ID', '__x__'), 'description' => __('(Optional) Enter a unique ID.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_column_inner', array('param_name' => 'class', 'heading' => __('Class', '__x__'), 'description' => __('(Optional) Enter a unique class name.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     vc_add_param('vc_column_inner', array('param_name' => 'style', 'heading' => __('Style', '__x__'), 'description' => __('(Optional) Enter inline CSS.', '__x__'), 'type' => 'textfield', 'holder' => 'div'));
     //
     // [vc_widget_sidebar]
     //
     vc_map_update('vc_widget_sidebar', array('name' => __('Widget Area', '__x__'), 'weight' => 950, 'icon' => 'widget-area', 'category' => __('Content', '__x__'), 'description' => __('Place one of your widget areas into your content', '__x__')));
     vc_remove_param('vc_widget_sidebar', 'title');
     vc_remove_param('vc_widget_sidebar', 'el_class');
     //
     // [vc_raw_html]
     //
     vc_map_update('vc_raw_html', array('name' => __('Raw HTML', '__x__'), 'weight' => 939, 'icon' => 'raw-html', 'category' => __('Content', '__x__'), 'description' => __('Output raw HTML code on your page', '__x__')));
     //
     // [vc_raw_js]
     //
     vc_map_update('vc_raw_js', array('name' => __('Raw JavaScript', '__x__'), 'weight' => 938, 'icon' => 'raw-js', 'category' => __('Content', '__x__'), 'description' => __('Output raw JavaScript code on your page', '__x__')));
//.........这里部分代码省略.........
开发者ID:kevinotsuka,项目名称:datapop,代码行数:101,代码来源:visual-composer.php

示例13: vc_remove_element

vc_remove_element("vc_message");
vc_remove_element("vc_pie");
vc_remove_element("vc_posts_slider");
vc_remove_element("vc_toggle");
vc_remove_element("vc_progress_bar");
vc_remove_element("vc_gallery");
//vc_remove_element("vc_tta_accordion");
//vc_remove_element("vc_tta_tour");
//vc_remove_element("vc_tta_tab");
//vc_remove_element("vc_tabs");
//vc_remove_element("vc_accordion");
//vc_remove_element("vc_tta_tabs");
$remove_depreciate = array('deprecated' => '');
vc_map_update('vc_tab', $remove_depreciate);
vc_map_update('vc_tour', $remove_depreciate);
vc_map_update('vc_accordion_tab', $remove_depreciate);
// Add VC admin CSS styles
function load_custom_vc_admin_style()
{
    wp_register_style('custom_vc_admin_css', get_template_directory_uri() . '/dynamo_framework/vc_extend/dp_vc_admin.css', false, '');
    wp_enqueue_style('custom_vc_admin_css');
}
add_action('admin_enqueue_scripts', 'load_custom_vc_admin_style');
//Add VC frontend styles
function load_custom_vc_frontend_style()
{
    wp_register_style('custom_vc_frontend_css', get_template_directory_uri() . '/dynamo_framework/vc_extend/dp_vc_frontend.css', array('js_composer_front'), '', 'screen');
    wp_enqueue_style('custom_vc_frontend_css');
}
add_action('wp_head', 'load_custom_vc_frontend_style', 6);
// Add custom functions and arrays
开发者ID:Karpec,项目名称:geo-mac,代码行数:31,代码来源:dp-extend-vc.php

示例14: presscore_get_vc_animation_options

$param['value'] = presscore_get_vc_animation_options();
WPBMap::mutateParam('vc_toggle', $param);
//***********************************************************************
// Single Image
//***********************************************************************
// add custom animation
$param = WPBMap::getParam('vc_single_image', 'css_animation');
$param['value'] = presscore_get_vc_animation_options();
WPBMap::mutateParam('vc_single_image', $param);
// replace pretty photo with theme popup
$param = WPBMap::getParam('vc_single_image', 'onclick');
if ($param && ($key = array_search('link_image', $param['value']))) {
    unset($param['value'][$key]);
    $key = 'Open Magnific Popup';
    $param['value'][$key] = 'link_image';
    WPBMap::mutateParam('vc_single_image', $param);
}
unset($param, $key);
vc_add_param("vc_single_image", array("type" => "dropdown", "class" => "", "heading" => __("Image hovers", 'the7mk2'), "param_name" => "image_hovers", "std" => "true", "value" => array("Disabled" => "false", "Enabled" => "true")));
//***********************************************************************
// Accordion
//***********************************************************************
// undeprecate
vc_map_update("vc_accordion", array("deprecated" => null, "category" => __('by Dream-Theme', 'the7mk2'), "icon" => "dt_vc_ico_accordion", "weight" => -1));
vc_add_param("vc_accordion", array("type" => "dropdown", "heading" => __("Style", 'the7mk2'), "param_name" => "style", "value" => array('Style 1 (no background)' => '1', 'Style 2 (with background)' => '2', 'Style 3 (with dividers)' => '3'), "description" => ""));
//***********************************************************************
// Deprecated shortcodes
//***********************************************************************
vc_map_update('vc_text_separator', array("deprecated" => '4.6'));
vc_map_update('vc_separator', array("deprecated" => '4.6'));
开发者ID:evanbuss,项目名称:wordpress,代码行数:30,代码来源:js_composer_bridge.php

示例15: add_custom_theme_vc_params

function add_custom_theme_vc_params()
{
    // Old element color structure
    // ...............................................................
    // Visual Composer color values
    $vc_colors = 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");
    // Custom color values
    $theme_custom_colors = array(__("Theme Default", "framework") => "theme-default", __("Theme Accent Color", "framework") => "accent-primary");
    // Merged all colors
    $all_colors = array_merge((array) $theme_custom_colors, (array) $vc_colors);
    // Updated element color structure
    // ...............................................................
    // Visual Composer color values
    $vc_shared_colors = function_exists('getVcShared') ? getVcShared("colors") : array();
    // Custom color values
    $theme_custom_shared_colors = array(__("Theme Default", "framework") => "theme-default", __("Theme Accent Color", "framework") => "accent-primary");
    // Merged all colors
    $all_shared_colors = array_merge((array) $theme_custom_shared_colors, (array) $vc_shared_colors);
    // Apply updtes to default VC elements using add param function
    // ===============================================================
    if (function_exists('vc_add_param')) {
        // Add custom progress bar colors
        // ===============================================================
        // Add parameters to 'vc_progress_bar'
        // ...............................................................
        $base = 'vc_progress_bar';
        $extraParams = array(array("type" => "dropdown", "heading" => __("Bar color", "js_composer"), "param_name" => "bgcolor", "value" => array_merge(array(__("Theme Accent Color", "js_composer") => "accent-primary"), (array) $vc_colors), "description" => __("Select bar background color.", "js_composer"), "admin_label" => true));
        foreach ($extraParams as $params) {
            vc_add_param($base, $params);
        }
        // Add custom button colors
        // ===============================================================
        // Add parameters to 'vc_button' (Button)
        // ...............................................................
        $base = 'vc_button';
        $extraParams = array(array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => $all_colors, "description" => __("Button color.", "js_composer"), "param_holder_class" => 'vc-colored-dropdown'));
        foreach ($extraParams as $params) {
            vc_add_param($base, $params);
        }
        // Add parameters to 'vc_button2' (Button 2)
        // ...............................................................
        /*$base = 'vc_button2';
        		$extraParams = array(
        			array(
        				"type" => "dropdown",
        				"heading" => __("Color", "js_composer"),
        				"param_name" => "color",
        				"value" => $all_shared_colors,
        				"description" => __("Button color.", "js_composer"),
        				"param_holder_class" => 'vc-colored-dropdown'
        			)
        		);
        		foreach ($extraParams as $params) {
        			vc_add_param( $base, $params );
        		}*/
        // Add parameters to 'vc_cta_button' (Call to Action)
        // ...............................................................
        $base = 'vc_cta_button';
        $extraParams = array(array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => $all_colors, "description" => __("Button color.", "js_composer"), "param_holder_class" => 'vc-colored-dropdown'));
        foreach ($extraParams as $params) {
            vc_add_param($base, $params);
        }
        // Add parameters to 'vc_cta_button2' (Call to Action 2)
        // ...............................................................
        /*$base = 'vc_cta_button2'; 
        		$extraParams = array(
        			array(
        				"type" => "dropdown",
        				"heading" => __("Color", "js_composer"),
        				"param_name" => "color",
        				"value" => $all_shared_colors,
        				"description" => __("Button color.", "js_composer"),
        				"param_holder_class" => 'vc-colored-dropdown'
        			)
        		);
        		foreach ($extraParams as $params) {
        			vc_add_param( $base, $params );
        		}*/
        // Add custom row options
        // ===============================================================
        // Add parameters to 'vc_row'
        $base = 'vc_row';
        $extraParams = array(array("type" => "checkbox", "param_name" => "bg_parallax", "value" => array(__('Enable parallax effect', 'framework') => 'true'), "description" => __("Make the background image have a parallax scrolling effect.", "framework")), array("type" => "dropdown", "class" => "", "heading" => __("Scroll Offset (inertia)", 'framework'), "param_name" => "inertia", "value" => array(1 => '0.1', 2 => '0.2', 3 => '0.3', 4 => '0.4', 5 => '0.5', 6 => '0.6', 7 => '0.7', 8 => '0.8', 9 => '0.9'), "description" => __("Specify the offset speed of the parallax effect. The lower the number the less the background moves relative to browser window.", 'framework')), array("type" => "textfield", "admin_label" => true, "heading" => __("Google Maps Url", "framework"), "param_name" => "bg_maps", "description" => __("Instead of a background image, show a gorgeous full width google map. Parallax effect won't apply here.", "framework")), array("type" => "textfield", "admin_label" => true, "heading" => __("Google Maps Height", "framework"), "param_name" => "bg_maps_height", "description" => __("Specify the height of the maps. (default 200px)", "framework")), array("type" => "textfield", "admin_label" => true, "heading" => __("Google Maps Zoom Level", "framework"), "param_name" => "bg_maps_zoom", "description" => __("Specify the zoom level for the maps. The higher the number the closer up it gets zoomed in. (Range 1 - 19, 17 by default)", "framework")), array("type" => "checkbox", "param_name" => "bg_maps_scroll", "value" => array(__('Google Maps Mousewheel Scrolling', 'framework') => 'true'), "description" => __("Should the user be able to scroll the maps with his mousewheel? Not recommended for one page layouts.", 'framework')), array("type" => "checkbox", "param_name" => "bg_maps_infobox", "value" => array(__('Google Maps Show info box', 'framework') => 'true'), "description" => __("Shows an information box right next to the pin that locates the address.", "framework")), array("type" => "textarea", "admin_label" => true, "heading" => __("Google Maps Info Box Content", "framework"), "param_name" => "bg_maps_infobox_content", "description" => __("Enter the content that should be shown in the information box of the location. If empty, the address will be shown. Basic HTML allowed.", "framework")));
        foreach ($extraParams as $params) {
            vc_add_param($base, $params);
        }
        // Update 'vc_row' to include custom shortcode template and re-map shortcode
        $sc = vc_map_update('vc_row', array('html_template' => locate_template('templates/vc_templates/vc_row.php')));
        // Remove default vc_row shortcode
        vc_remove_element('vc_row');
        // Remap shortcode, identical to original, but with custom template path
        vc_map($sc['vc_row']);
    }
}
开发者ID:ArnaudGuillou,项目名称:SiteESBVolley,代码行数:94,代码来源:js_composer-custom.php


注:本文中的vc_map_update函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。