コード例 #1
2
function kt_add_option_to_vc()
{
    $color_arr = array('vc_btn', 'vc_icon', 'vc_tta_accordion', 'vc_tta_tabs', 'vc_tta_tour');
    foreach ($color_arr as $item) {
        $button_colors = WPBMap::getParam($item, 'color');
        $button_colors['value'][esc_html__('Accent color', 'adroit')] = 'accent';
        vc_update_shortcode_param($item, $button_colors);
    }
    $background_arr = array('vc_icon');
    foreach ($background_arr as $item) {
        $button_colors = WPBMap::getParam($item, 'background_color');
        $button_colors['value'][esc_html__('Accent color', 'adroit')] = 'accent';
        vc_update_shortcode_param($item, $button_colors);
    }
    $image_styles = WPBMap::getParam('vc_single_image', 'style');
    $image_styles['value'][esc_html__('Border box', 'adroit')] = 'border-box';
    $image_styles['value'][esc_html__('Border box Left', 'adroit')] = 'border-left';
    $image_styles['value'][esc_html__('Border box Right', 'adroit')] = 'border-right';
    $image_styles['value'][esc_html__('Creative Left', 'adroit')] = 'creative-left';
    $image_styles['value'][esc_html__('Creative Right', 'adroit')] = 'creative-right';
    $image_styles['value'][esc_html__('Creative When hover', 'adroit')] = 'creative-hover';
    vc_update_shortcode_param('vc_single_image', $image_styles);
    $icon_btn = array('i_type', 'i_icon_fontawesome', 'i_icon_openiconic', 'i_icon_typicons', 'i_icon_entypo', 'i_icon_linecons', 'i_icon_pixelicons', 'css_animation', 'el_class');
    foreach ($icon_btn as $item) {
        vc_remove_param('vc_btn', $item);
    }
}
コード例 #2
0
function laborator_vc_row_full_width()
{
    # Full Width Param
    $param = WPBMap::getParam('vc_row', 'full_width');
    $param['value'][__('Full width', 'lab_composer')] = 'lab-full-width';
    vc_update_shortcode_param('vc_row', $param);
}
コード例 #3
0
ファイル: extend-vc.php プロジェクト: k2jysy/wedev
 function qode_remove_vc_image_zoom()
 {
     //Remove zoom from click action on single image
     $param = WPBMap::getParam('vc_single_image', 'onclick');
     unset($param['value']['Zoom']);
     vc_update_shortcode_param('vc_single_image', $param);
 }
コード例 #4
0
function cruxstore_add_option_to_vc()
{
    $image_styles = WPBMap::getParam('vc_single_image', 'style');
    $image_styles['value'][esc_html__('Border box inner 1', 'cruxstore')] = 'border-box-1';
    $image_styles['value'][esc_html__('Border box inner 2', 'cruxstore')] = 'border-box-2';
    $image_styles['value'][esc_html__('Zoom In', 'cruxstore')] = 'zoomin';
    $image_styles['value'][esc_html__('Zoom Out', 'cruxstore')] = 'zoomout';
    $image_styles['value'][esc_html__('Slide', 'cruxstore')] = 'slide';
    $image_styles['value'][esc_html__('Shine', 'cruxstore')] = 'shine';
    vc_update_shortcode_param('vc_single_image', $image_styles);
    $accordion_styles = WPBMap::getParam('vc_tta_accordion', 'style');
    $accordion_styles['value'][esc_html__('Outline Wrapper', 'cruxstore')] = 'wrapper';
    $accordion_styles['value'][esc_html__('Outline Wrapper Shadow', 'cruxstore')] = 'wrapper shadow';
    vc_update_shortcode_param('vc_tta_accordion', $accordion_styles);
    $accordion_iconss = WPBMap::getParam('vc_tta_accordion', 'c_icon');
    $accordion_iconss['value'][esc_html__('Arrow Circle', 'cruxstore')] = 'arrow-circle';
    vc_update_shortcode_param('vc_tta_accordion', $accordion_iconss);
    $tab_styles = WPBMap::getParam('vc_tta_tabs', 'style');
    $tab_styles['value'][esc_html__('Outline Wrapper', 'cruxstore')] = 'wrapper';
    $tab_styles['value'][esc_html__('Outline Wrapper Shadow', 'cruxstore')] = 'wrapper shadow';
    vc_update_shortcode_param('vc_tta_tabs', $tab_styles);
    $cta_styles = WPBMap::getParam('vc_cta', 'style');
    $cta_styles['value'][esc_html__('Transparent', 'cruxstore')] = 'transparent';
    vc_update_shortcode_param('vc_cta', $cta_styles);
    $button_colors = WPBMap::getParam('vc_btn', 'color');
    $button_colors['value'][esc_html__('Accent color', 'cruxstore')] = 'accent';
    vc_update_shortcode_param('vc_btn', $button_colors);
}
コード例 #5
0
 /**
  * Used to update default parms
  *
  * @since 3.0.0
  * @access public
  */
 public function update_params()
 {
     $param = WPBMap::getParam('vc_single_image', 'img_size');
     if ($param) {
         $param['value'] = 'full';
         vc_update_shortcode_param('vc_single_image', $param);
     }
 }
コード例 #6
0
ファイル: vc-config.php プロジェクト: prosatya/WF-Gmap
function add_cta_button_super_color()
{
    //Get current values stored in the color param in "Call to Action" element
    $param = WPBMap::getParam('vc_cta', 'color');
    //Append new value to the 'value' array
    $param['value'][__('WF', 'webidia')] = 'btn-wf-color';
    $param['std'] = 'btn-wf-color';
    //Finally "mutate" param with new values
    vc_update_shortcode_param('vc_cta', $param);
}
コード例 #7
0
function lab_vc_tta_tabs_setup()
{
    $new_param = array('Theme Styled (if selected, other style settings will be ignored)' => 'theme-styled');
    $new_param_minimal = array('Theme Styled Minimal (if selected, other style settings will be ignored)' => 'theme-styled-minimal');
    $tabs_param = WPBMap::getParam('vc_tta_tabs', 'style');
    $accordion_param = WPBMap::getParam('vc_tta_accordion', 'style');
    $tabs_param['value'] = array_merge($new_param, $new_param_minimal, $tabs_param['value']);
    $accordion_param['value'] = array_merge($new_param, $accordion_param['value']);
    vc_update_shortcode_param('vc_tta_tabs', $tabs_param);
    vc_update_shortcode_param('vc_tta_accordion', $accordion_param);
}
コード例 #8
0
function kt_add_option_to_vc()
{
    $image_styles = WPBMap::getParam('vc_single_image', 'style');
    $image_styles['value'][esc_html__('Border box', 'mondova')] = 'border-box';
    $image_styles['value'][esc_html__('Border box inner 1', 'mondova')] = 'border-box-1';
    $image_styles['value'][esc_html__('Border box inner 2', 'mondova')] = 'border-box-2';
    $image_styles['value'][esc_html__('Zoom In', 'mondova')] = 'zoomin';
    $image_styles['value'][esc_html__('Zoom Out', 'mondova')] = 'zoomout';
    $image_styles['value'][esc_html__('Slide', 'mondova')] = 'slide';
    $image_styles['value'][esc_html__('Shine', 'mondova')] = 'shine';
    vc_update_shortcode_param('vc_single_image', $image_styles);
}
コード例 #9
0
 /**
  * Used to update default parms
  *
  * @since 3.0.0
  */
 public function update_params()
 {
     // Only needed on front-end
     if (!is_admin()) {
         return;
     }
     // Set ID weight
     $param = WPBMap::getParam('vc_row', 'el_id');
     if ($param) {
         $param['weight'] = 99;
         vc_update_shortcode_param('vc_row', $param);
     }
     // Set class weight
     $param = WPBMap::getParam('vc_row', 'el_class');
     if ($param) {
         $param['weight'] = 98;
         $time_start = microtime(true);
         vc_update_shortcode_param('vc_row', $param);
     }
     // Move video parallax setting
     $param = WPBMap::getParam('vc_row', 'video_bg_parallax');
     if ($param) {
         $param['group'] = __('Video', 'wpex');
         $param['dependency'] = array('element' => 'video_bg', 'value' => 'youtube');
         vc_update_shortcode_param('vc_row', $param);
     }
     // Move youtube url
     $param = WPBMap::getParam('vc_row', 'video_bg_url');
     if ($param) {
         $param['group'] = __('Video', 'wpex');
         $param['dependency'] = array('element' => 'video_bg', 'value' => 'youtube');
         vc_update_shortcode_param('vc_row', $param);
     }
     // Alter Parallax dropdown
     $param = WPBMap::getParam('vc_row', 'parallax');
     if ($param) {
         $param['group'] = __('Parallax', 'wpex');
         $param['value'][__('Advanced Parallax', 'wpex')] = 'vcex_parallax';
         vc_update_shortcode_param('vc_row', $param);
     }
     // Alter Parallax image location
     $param = WPBMap::getParam('vc_row', 'parallax_image');
     if ($param) {
         $param['group'] = __('Parallax', 'wpex');
         vc_update_shortcode_param('vc_row', $param);
     }
     // Move design options
     $param = WPBMap::getParam('vc_row', 'css');
     if ($param) {
         $param['weight'] = -1;
         vc_update_shortcode_param('vc_row', $param);
     }
 }
コード例 #10
0
ファイル: single-image.php プロジェクト: iq007/MadScape
 /**
  * Used to update default parms
  *
  * @since 3.0.0
  * @access public
  */
 public function update_params()
 {
     $param = WPBMap::getParam('vc_single_image', 'img_size');
     if ($param) {
         $param['value'] = 'full';
         vc_update_shortcode_param('vc_single_image', $param);
     }
     $param = WPBMap::getParam('vc_single_image', 'img_link_target');
     if ($param) {
         $param['value'][esc_html__('Local', 'total')] = 'local';
         vc_update_shortcode_param('vc_single_image', $param);
     }
 }
コード例 #11
0
function lab_vc_custom_icon_fonts()
{
    # Add Extra Icon Fonts
    $param = WPBMap::getParam('vc_icon', 'type');
    if (!is_array($param)) {
        return false;
    }
    $param['weight'] = 2;
    $param['value'] = array('Linea' => 'linea') + $param['value'];
    vc_update_shortcode_param('vc_icon', $param);
    # Add Param Type
    $attributes = array('type' => 'iconpicker', 'heading' => __('Icon', 'lab_composer'), 'param_name' => 'icon_linea', 'value' => 'icon-basic-accelerator', 'weight' => 1, 'settings' => array('emptyIcon' => false, 'type' => 'linea', 'iconsPerPage' => -1), 'dependency' => array('element' => 'type', 'value' => 'linea'), 'description' => __('Select icon from library.', 'lab_composer'));
    vc_add_param('vc_icon', $attributes);
    # Set Default Color to Black
    $param = WPBMap::getParam('vc_icon', 'color');
    $param['std'] = 'black';
    vc_update_shortcode_param('vc_icon', $param);
    # Custom Icon
    add_action('admin_print_styles', 'lab_vc_custom_icon_css');
}
コード例 #12
0
function nm_vc_single_image_param_onclick()
{
    // Get param values
    $param = WPBMap::getParam('vc_single_image', 'onclick');
    // Replace param values
    $param['value'] = array(__('None', 'js_composer') => '', __('Link to large image', 'js_composer') => 'img_link_large', __('Open custom link', 'js_composer') => 'custom_link');
    // Finally "mutate" param with new values
    vc_update_shortcode_param('vc_single_image', $param);
}
コード例 #13
0
ファイル: shortcodes.php プロジェクト: ConceptHaus/backup
 function add_link_color()
 {
     $param = WPBMap::getParam('vc_btn', 'color');
     if (isset($param['value']) || isset($param['std'])) {
         $param['value'][__('Link Color', 'js_composer')] = 'link_color';
         $param['std'] = 'link_color';
     }
     vc_update_shortcode_param('vc_btn', $param);
     $param = WPBMap::getParam('vc_icon', 'color');
     if (isset($param['value']) || isset($param['std'])) {
         $param['value'][__('Link Color', 'js_composer')] = 'link_color';
         $param['std'] = 'link_color';
     }
     vc_update_shortcode_param('vc_icon', $param);
     $param = WPBMap::getParam('vc_icon', 'background_color');
     if (isset($param['value']) || isset($param['std'])) {
         $param['value'][__('Link Color', 'js_composer')] = 'link_color';
         $param['std'] = 'link_color';
     }
     vc_update_shortcode_param('vc_icon', $param);
 }
コード例 #14
0
ファイル: vc_functions.php プロジェクト: rhondamoananui/rehub
 function re_remove_slider_type()
 {
     $param = WPBMap::getParam('vc_gallery', 'type');
     unset($param['value'][__('Flex slider fade', 'js_composer')]);
     vc_update_shortcode_param('vc_gallery', $param);
 }
コード例 #15
0
ファイル: elements.php プロジェクト: morganloehr/chris-verna
 * @website  http://www.wpopal.com
 * @support  http://www.wpopal.com/support/forum.html
 */
/**
 * Call To Action
 */
function training_wpo_get_iconstyles()
{
    return array(esc_html__('Default', 'training') => '', esc_html__('Outline Default', 'training') => 'icons-outline icons-default', esc_html__('Outline Primary', 'training') => 'icons-outline icons-primary', esc_html__('Outline Danger', 'training') => 'icons-outline icons-danger', esc_html__('Outline Success', 'training') => 'icons-outline icons-success', esc_html__('Outline Warning', 'training') => 'icons-outline icons-warning', esc_html__('Outline Info', 'training') => 'icons-outline icons-info', esc_html__('Inverse Default', 'training') => 'icons-inverse icons-default', esc_html__('Inverse Primary', 'training') => 'icons-inverse icons-primary', esc_html__('Inverse Danger', 'training') => 'icons-inverse icons-danger', esc_html__('Inverse Success', 'training') => 'icons-inverse icons-success', esc_html__('Inverse Warning', 'training') => 'icons-inverse icons-warning', esc_html__('Inverse Info', 'training') => 'icons-inverse icons-info', esc_html__('Light', 'training') => 'icons-light', esc_html__('Dark', 'training') => 'icons-darker', esc_html__('Color Default', 'training') => 'text-default nostyle', esc_html__('Color Primary', 'training') => 'text-primary nostyle', esc_html__('Color Danger', 'training') => 'text-danger nostyle', esc_html__('Color Success', 'training') => 'text-success nostyle', esc_html__('Color Info', 'training') => 'text-info');
}
vc_update_shortcode_param('vc_cta_button2', array('type' => 'dropdown', 'heading' => esc_html__('Button Style Color', 'training'), 'param_name' => 'color', 'prioryty' => 1, 'value' => array(esc_html__('Default', 'training') => 'btn-default', esc_html__('Primary', 'training') => 'btn-primary', esc_html__('Danger', 'training') => 'btn-danger', esc_html__('Success', 'training') => 'btn-success', esc_html__('Info', 'training') => 'btn-info', esc_html__('Warning', 'training') => 'btn-warning', esc_html__('Outline Primary', 'training') => 'btn-outline btn-primary', esc_html__('Outline Danger', 'training') => 'btn-outline btn-danger', esc_html__('Outline Success', 'training') => 'btn-outline btn-success', esc_html__('Outline Info', 'training') => 'btn-outline btn-info', esc_html__('Outline Warning', 'training') => 'btn-outline btn-warning', esc_html__('Inverse Primary', 'training') => 'btn-inverse btn-primary', esc_html__('Inverse Danger', 'training') => 'btn-inverse btn-danger', esc_html__('Inverse Success', 'training') => 'btn-inverse btn-success', esc_html__('Inverse Info', 'training') => 'btn-inverse btn-info', esc_html__('Inverse  Warning', 'training') => 'btn-inverse btn-warning')));
vc_update_shortcode_param('vc_cta_button2', array('type' => 'dropdown', 'heading' => esc_html__('Heading Style', 'training'), 'param_name' => 'heading_style', 'prioryty' => 2, 'value' => array(esc_html__('Default', 'training') => 'default', esc_html__('Version 1', 'training') => 'v1', esc_html__('Version 2', 'training') => 'v2', esc_html__('Version 3', 'training') => 'v3', esc_html__('Version 4', 'training') => 'v4', esc_html__('Version 5', 'training') => 'v5', esc_html__('Version 6', 'training') => 'v6', esc_html__('Version 7', 'training') => 'v7', esc_html__('Version 8', 'training') => 'v8', esc_html__('Version 9', 'training') => 'v9', esc_html__('Version 10', 'training') => 'v10')));
vc_update_shortcode_param('vc_cta_button2', array('type' => 'dropdown', 'heading' => esc_html__('CTA Style', 'training'), 'param_name' => 'style', 'prioryty' => 1, 'value' => array(esc_html__('Version 1', 'training') => '1', esc_html__('Version 2', 'training') => '2', esc_html__('Version Light Style 1', 'training') => '1 light-style ', esc_html__('Version Light Style 2', 'training') => '2 light-style ')));
vc_update_shortcode_param('vc_cta_button2', array('type' => 'dropdown', 'heading' => esc_html__('Button Radius Style', 'training'), 'param_name' => 'btn_style', 'prioryty' => 1, 'value' => array(esc_html__('None', 'training') => '', esc_html__('Radius 50%', 'training') => '', esc_html__('Radius 1x', 'training') => 'radius-1x', esc_html__('Radius 2x', 'training') => 'radius-2x', esc_html__('Radius 3x', 'training') => 'radius-3x', esc_html__('Radius 4x', 'training') => 'radius-4x', esc_html__('Radius 5x', 'training') => 'radius-5x', esc_html__('Radius 6x', 'training') => 'radius-6x')));
//Accordions
vc_update_shortcode_param('vc_accordion', array('type' => 'dropdown', 'heading' => esc_html__('Style', 'training'), 'param_name' => 'style', 'prioryty' => 1, 'value' => array(esc_html__('Style 1', 'training') => 'style-1', esc_html__('Style 2', 'training') => 'style-2')));
//Accordions
vc_update_shortcode_param('vc_toggle', array('type' => 'dropdown', 'heading' => esc_html__('Skin', 'training'), 'param_name' => 'skin', 'prioryty' => 1, 'value' => array(esc_html__('Skin 1', 'training') => '', esc_html__('Style 2', 'training') => 'style-2')));
//Tabs
vc_update_shortcode_param('vc_tabs', array('type' => 'dropdown', 'heading' => esc_html__('Style', 'training'), 'param_name' => 'style', 'prioryty' => 1, 'value' => array(esc_html__('Default', 'training') => '', esc_html__('Style 1', 'training') => 'style-1', esc_html__('Style 2', 'training') => 'style-2', esc_html__('Style 3', 'training') => 'style-3', esc_html__('Style 4', 'training') => 'style-4', esc_html__('Style 5', 'training') => 'style-5')));
//Tab
vc_update_shortcode_param('vc_tab', array('type' => 'textfield', 'heading' => esc_html__('Icon', 'training'), 'param_name' => 'icon', 'prioryty' => 1, 'value' => ''));
vc_update_shortcode_param('vc_tab', array('type' => 'textarea', 'heading' => esc_html__('Description', 'training'), 'param_name' => 'description', 'prioryty' => 1, 'value' => ''));
//Add animation column
$cssAnimation = array(esc_html__("No", 'training') => '', esc_html__("Top to bottom", 'training') => "top-to-bottom", esc_html__("Bottom to top", 'training') => "bottom-to-top", esc_html__("Left to right", 'training') => "left-to-right", esc_html__("Right to left", 'training') => "right-to-left", esc_html__("Appear from center", 'training') => "appear", 'bounce' => 'bounce', 'flash' => 'flash', 'pulse' => 'pulse', 'rubberBand' => 'rubberBand', 'shake' => 'shake', 'swing' => 'swing', 'tada' => 'tada', 'wobble' => 'wobble', 'bounceIn' => 'bounceIn', 'fadeIn' => 'fadeIn', 'fadeInDown' => 'fadeInDown', 'fadeInDownBig' => 'fadeInDownBig', 'fadeInLeft' => 'fadeInLeft', 'fadeInLeftBig' => 'fadeInLeftBig', 'fadeInRight' => 'fadeInRight', 'fadeInRightBig' => 'fadeInRightBig', 'fadeInUp' => 'fadeInUp', 'fadeInUpBig' => 'fadeInUpBig', 'flip' => 'flip', 'flipInX' => 'flipInX', 'flipInY' => 'flipInY', 'lightSpeedIn' => 'lightSpeedIn', 'rotateInrotateIn' => 'rotateIn', 'rotateInDownLeft' => 'rotateInDownLeft', 'rotateInDownRight' => 'rotateInDownRight', 'rotateInUpLeft' => 'rotateInUpLeft', 'rotateInUpRight' => 'rotateInUpRight', 'slideInDown' => 'slideInDown', 'slideInLeft' => 'slideInLeft', 'slideInRight' => 'slideInRight', 'rollIn' => 'rollIn');
$add_css_animation = array("type" => "dropdown", "heading" => esc_html__("CSS Animation", 'training'), "param_name" => "css_animation", "admin_label" => true, "value" => $cssAnimation, "description" => esc_html__("Select animation type if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.", 'training'));
vc_add_param('vc_column', $add_css_animation);
vc_add_param('vc_column_inner', $add_css_animation);
vc_update_shortcode_param('vc_gmaps', array('type' => 'dropdown', 'heading' => esc_html__('Display Style', 'training'), 'param_name' => 'display_style', 'value' => array('Default' => '', 'Popup' => 'popup')));
vc_update_shortcode_param('vc_gmaps', array('type' => 'attach_image', 'heading' => esc_html__('Image (use display style popup)', 'training'), 'param_name' => 'image', 'value' => array('Default' => '', 'Popup' => 'popup')));
コード例 #16
0
function nm_vc_single_image_param_onclick()
{
    // Get param values
    $param = WPBMap::getParam('vc_single_image', 'onclick');
    // Remove param values
    unset($param['value'][__('Open prettyPhoto', 'js_composer')]);
    unset($param['value'][__('Zoom', 'js_composer')]);
    // Finally "mutate" param with new values
    vc_update_shortcode_param('vc_single_image', $param);
}
コード例 #17
0
ファイル: image-zoooom.php プロジェクト: AndyA/River
 /**
  * Add zoom option in the vc_single_image shortcode in Visual Composer
  */
 function js_composer()
 {
     if (!defined('WPB_VC_VERSION')) {
         return false;
     }
     $param = WPBMap::getParam('vc_single_image', 'style');
     if (is_array($param)) {
         $param['value'][__('WP Image Zoooom', 'zoooom')] = 'zoooom';
         vc_update_shortcode_param('vc_single_image', $param);
     }
 }
コード例 #18
0
ファイル: vc-extend.php プロジェクト: siiiiilvio/kadcnc
function waxom_vc_update_defaults()
{
    // Change the default single image size to 'full'
    $param = WPBMap::getParam('vc_single_image', 'img_size');
    $param['value'] = 'full';
    vc_update_shortcode_param('vc_single_image', $param);
    // Add Accent color to Progress Bars
    $param = WPBMap::getParam('vc_progress_bar', 'bgcolor');
    $param['value'][esc_html__('Accent', 'waxom')] = 'accent';
    vc_update_shortcode_param('vc_progress_bar', $param);
}
コード例 #19
0
 public function update_params()
 {
     // vc_message style
     vc_update_shortcode_param('vc_message', array('type' => 'dropdown', 'heading' => __('Style', DH_DOMAIN), 'param_name' => 'style', 'value' => self::$button_styles, 'description' => __('Alert style.', DH_DOMAIN)));
     vc_update_shortcode_param('vc_progress_bar', array('type' => 'textfield', 'std' => '%', 'heading' => __('Units', 'js_composer'), 'param_name' => 'units', 'description' => __('Enter measurement units (if needed) Eg. %, px, points, etc. Graph value and unit will be appended to the graph title.', 'js_composer')));
     vc_update_shortcode_param('vc_message', array('type' => 'dropdown', 'heading' => __('Message box type', DH_DOMAIN), 'param_name' => 'color', 'value' => array(__('Default', DH_DOMAIN) => 'default', __('Primary', DH_DOMAIN) => 'primary', __('Success', DH_DOMAIN) => 'success', __('Info', DH_DOMAIN) => 'info', __('Warning', DH_DOMAIN) => 'warning', __('Danger', DH_DOMAIN) => 'danger'), 'admin_label' => true, 'description' => __('Select message type.', DH_DOMAIN), 'param_holder_class' => $this->param_holder));
     vc_update_shortcode_param('vc_button', array('type' => 'textfield', 'heading' => __('Title', DH_DOMAIN), 'param_name' => 'title', 'admin_label' => true, 'value' => __('Button', DH_DOMAIN), 'description' => __('Text on the button.', DH_DOMAIN)));
 }