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); } }
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); }
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); }
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); }
/** * 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); } }
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); }
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); }
/** * 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); } }
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); }
/** * 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); } }
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'); }
public function getAttributes($atts) { $text = $google_fonts = $font_container = $el_class = $css = ''; /** * Get default values from VC_MAP. **/ $google_fonts_field = WPBMap::getParam('vc_custom_heading', 'google_fonts'); $font_container_field = WPBMap::getParam('vc_custom_heading', 'font_container'); $el_class_field = WPBMap::getParam('vc_custom_heading', 'el_class'); $css_field = WPBMap::getParam('vc_custom_heading', 'css'); $text_field = WPBMap::getParam('vc_custom_heading', 'text'); extract(shortcode_atts(array('text' => isset($text_field['value']) ? $text_field['value'] : '', 'google_fonts' => isset($google_fonts_field['value']) ? $google_fonts_field['value'] : '', 'font_container' => isset($font_container_field['value']) ? $font_container_field['value'] : '', 'el_class' => isset($el_class_field['value']) ? $el_class_field['value'] : '', 'css' => isset($css_field['value']) ? $css_field['value'] : ''), $atts)); $el_class = $this->getExtraClass($el_class); $font_container_obj = new Vc_Font_Container(); $google_fonts_obj = new Vc_Google_Fonts(); $font_container_field_settings = isset($font_container_field['settings'], $font_container_field['settings']['fields']) ? $font_container_field['settings']['fields'] : array(); $google_fonts_field_settings = isset($google_fonts_field['settings'], $google_fonts_field['settings']['fields']) ? $google_fonts_field['settings']['fields'] : array(); $font_container_data = $font_container_obj->_vc_font_container_parse_attributes($font_container_field_settings, $font_container); $google_fonts_data = $google_fonts_obj->_vc_google_fonts_parse_attributes($google_fonts_field_settings, $google_fonts); return array('text' => $text, 'google_fonts' => $google_fonts, 'font_container' => $font_container, 'el_class' => $el_class, 'css' => $css, 'font_container_data' => $font_container_data, 'google_fonts_data' => $google_fonts_data); }
/** * override input CSS Animation */ private function updateCssAnimationInput() { $elements = array('vc_column_text', 'vc_single_image', 'vc_message', 'vc_toggle', 'vc_single_image'); foreach ($elements as $value) { $param = WPBMap::getParam($value, 'css_animation'); $param['value'] = $this->cssAnimation; WPBMap::mutateParam($value, $param); } }
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); }
//*********************************************************************** // Message Box //*********************************************************************** // add custom animation $param = WPBMap::getParam('vc_message', 'css_animation'); $param['value'] = presscore_get_vc_animation_options(); WPBMap::mutateParam('vc_message', $param); //*********************************************************************** // Toggle //*********************************************************************** // add custom animation $param = WPBMap::getParam('vc_toggle', 'css_animation'); $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); 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 //*********************************************************************** 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("name" => __("Separator with Text (deprecated)", 'the7mk2'), "category" => __('Deprecated', 'the7mk2'), "weight" => -1)); vc_map_update('vc_separator', array("name" => __("Separator (deprecated)", 'the7mk2'), "category" => __('Deprecated', 'the7mk2'), "weight" => -1));
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); }
/** * Get param value by providing key * * @param $key * * @since 4.4 * @return array|bool */ protected function getParamData($key) { return WPBMap::getParam($this->shortcode, $this->getField($key)); }
function om_wpb_init() { vc_remove_element('vc_widget_sidebar'); vc_remove_element('vc_basic_grid'); vc_remove_element('vc_media_grid'); vc_remove_element('vc_masonry_grid'); vc_remove_element('vc_masonry_media_grid'); /** * Row */ vc_remove_param("vc_row", "css"); vc_remove_param("vc_row", "parallax"); vc_remove_param("vc_row", "parallax_image"); $param = WPBMap::getParam('vc_row', 'full_width'); $param['description'] = __('Please, note, that if you use "Stretch row" option you must hide the sidebar on the page to make use of this option.', 'om_theme'); WPBMap::mutateParam('vc_row', $param); /* vc_add_param('vc_row', array( 'type' => 'dropdown', 'heading' => __('Row Layout', 'om_theme'), 'param_name' => 'row_layout', 'value' => array( __('Standard', 'om_theme') => 'standard', __('Background - full width, content - standard width', 'om_theme') => 'expand_standard_paddings', __('Background - full width, content - full width with small paddings', 'om_theme') => 'expand_tiny_paddings', __('Background - full width, content - full width with no paddings', 'om_theme') => 'expand_no_paddings', ), 'description' => __( 'Please, note, that if you use "Expand to full width" option you must hide the sidebar on the page to make use of this option.', 'om_theme' ), )); */ vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Font color', 'om_theme'), 'param_name' => 'font_color', 'description' => __('Select custom font color or leave empty to use default.', 'om_theme'))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Row Background', 'om_theme'), 'param_name' => 'bg_type', 'value' => array(__('Solid Color', 'om_theme') => 'color', __('Gradient Color', 'om_theme') => 'gradient', __('Image', 'om_theme') => 'image', __('Video', 'om_theme') => 'video'), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Background color', 'om_theme'), 'param_name' => 'bg_color', 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('color', 'gradient')))); vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Background color 2', 'om_theme'), 'param_name' => 'bg_color2', 'description' => __('Second color of the gradient.', 'om_theme'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('gradient')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Gradient type', 'om_theme'), 'param_name' => 'gradient_type', 'value' => array(__('Vertical', 'om_theme') . ' ↓' => 'vertical', __('Horisontal', 'om_theme') . ' →' => 'horisontal', __('Diagonal', 'om_theme') . ' ↗' => 'diagonal1', __('Diagonal', 'om_theme') . ' ↘' => 'diagonal2', __('Radial', 'om_theme') . ' o' => 'radial'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('gradient')))); vc_add_param('vc_row', array('type' => 'attach_image', 'heading' => __('Background image', 'om_theme'), 'param_name' => 'bg_image', 'description' => __('Select background image for the row.', 'om_theme'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('image')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Background image position', 'om_theme'), 'param_name' => 'bg_image_pos', 'value' => array_flip(om_get_bg_img_pos_options()), 'dependency' => array('element' => 'bg_image', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Background image attachment', 'om_theme'), 'param_name' => 'bg_image_att', 'value' => array(__('Scroll', 'om_theme') => 'scroll', __('Fixed', 'om_theme') => 'fixed', __('Parallax, up direction', 'om_theme') => 'parallax', __('Parallax, down direction', 'om_theme') => 'parallax_down'), 'dependency' => array('element' => 'bg_image', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('Background Video File', 'om_theme'), 'param_name' => 'bg_video_src', 'description' => __('Select background video for the row.', 'om_theme'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('video')))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('MP4 Video File URL (Optional)', 'om_theme'), 'param_name' => 'bg_video_mp4', 'description' => __('Use as a fallback format in addition to the main video file.', 'om_theme'), 'dependency' => array('element' => 'bg_video_src', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('M4V Video File URL (Optional)', 'om_theme'), 'param_name' => 'bg_video_m4v', 'description' => __('Use as a fallback format in addition to the main video file.', 'om_theme'), 'dependency' => array('element' => 'bg_video_src', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('WebM Video File URL (Optional)', 'om_theme'), 'param_name' => 'bg_video_webm', 'description' => __('Use as a fallback format in addition to the main video file.', 'om_theme'), 'dependency' => array('element' => 'bg_video_src', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('OGV Video File URL (Optional)', 'om_theme'), 'param_name' => 'bg_video_ogv', 'description' => __('Use as a fallback format in addition to the main video file.', 'om_theme'), 'dependency' => array('element' => 'bg_video_src', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('WMV Video File URL (Optional)', 'om_theme'), 'param_name' => 'bg_video_wmv', 'description' => __('Use as a fallback format in addition to the main video file.', 'om_theme'), 'dependency' => array('element' => 'bg_video_src', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'attach_video', 'heading' => __('FLV Video File URL (Optional)', 'om_theme'), 'param_name' => 'bg_video_flv', 'description' => __('Use as a fallback format in addition to the main video file.', 'om_theme'), 'dependency' => array('element' => 'bg_video_src', 'not_empty' => true), 'group' => __('Background', 'om_theme'))); vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Fallback background color', 'om_theme'), 'param_name' => 'bg_color_fallback', 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('video')))); vc_add_param('vc_row', array('type' => 'attach_image', 'heading' => __('Fallback background image', 'om_theme'), 'param_name' => 'bg_image_fallback', 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('video')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Fancy bottom edge', 'om_theme'), 'param_name' => 'fancy_edge', 'value' => array(__('No', 'om_theme') => '', __('Diagonal', 'om_theme') . ' /' => 'diagonal_left', __('Diagonal', 'om_theme') . ' \\' => 'diagonal_right', __('Corner', 'om_theme') . ' \\/' => 'corner_down', __('Corner', 'om_theme') . ' /\\' => 'corner_up'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'bg_type', 'value' => array('color')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Edge size', 'om_theme'), 'param_name' => 'fancy_edge_size', 'value' => array(__('Small', 'om_theme') => 'sm', __('Medium', 'om_theme') => 'md', __('Large', 'om_theme') => 'lg', __('X-Large', 'om_theme') => 'xlg'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'fancy_edge', 'not_empty' => true))); vc_add_param('vc_row', array('type' => 'colorpicker', 'heading' => __('Edge transient color', 'om_theme'), 'param_name' => 'fancy_edge_t_color', 'description' => __('Set this color if you want to apply transition to custom color (for instance background color of next section). Leave empty to disable transition.', 'om_theme'), 'group' => __('Background', 'om_theme'), 'dependency' => array('element' => 'fancy_edge', 'not_empty' => true))); vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Top padding', 'om_theme'), 'param_name' => 'padding_top', 'description' => __('You can use px, em, %, etc. or enter just number and it will use pixels.', 'om_theme'), 'group' => __('Extra', 'om_theme'))); vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Bottom padding', 'om_theme'), 'param_name' => 'padding_bottom', 'description' => __('You can use px, em, %, etc. or enter just number and it will use pixels.', 'om_theme'), 'group' => __('Extra', 'om_theme'))); vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Top margin', 'om_theme'), 'param_name' => 'margin_top', 'description' => __('You can use px, em, %, etc. or enter just number and it will use pixels.', 'om_theme'), 'group' => __('Extra', 'om_theme'))); vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Bottom margin', 'om_theme'), 'param_name' => 'margin_bottom', 'description' => __('You can use px, em, %, etc. or enter just number and it will use pixels.', 'om_theme'), 'group' => __('Extra', 'om_theme'))); vc_add_param('vc_row', array('type' => 'textarea', 'heading' => __('Custom CSS Style', 'om_theme'), 'param_name' => 'custom_css', 'description' => __('You can add custom CSS style for the row.', 'om_theme'), 'group' => __('Extra', 'om_theme'))); /** * Video */ vc_add_param('vc_video', array('type' => 'dropdown', 'value' => array('2:1' => '2', '16:9' => '1.777778', 'Golden ratio (1.61)' => '1.61', '3:2' => '1.5', '4:3' => '1.333333', '1:1' => '1', '3:4' => '0.75', '2:3' => '0.666667', '9:16' => '0.5625', '1:2' => '0.5'), 'std' => '1.61', 'heading' => __('Width/Height Ratio', 'om_theme'), 'param_name' => 'ratio')); vc_add_param('vc_video', array('type' => 'textfield', 'heading' => __('Maximum width (pixels)', 'om_theme'), 'param_name' => 'maxwidth', 'description' => __('By default video will fit all available width, you can specify maximum width', 'js_composer'))); /** * Gallery */ $param = WPBMap::getParam('vc_gallery', 'type'); unset($param['value']['Flex slider fade']); unset($param['value']['Flex slider slide']); $param['value'] = array_merge(array(__('OM slider', 'om_theme') => 'om', __('Sliced', 'om_theme') => 'sliced', __('Masonry', 'om_theme') => 'masonry'), $param['value']); WPBMap::mutateParam('vc_gallery', $param); vc_remove_param("vc_gallery", "img_size"); vc_remove_param("vc_gallery", "el_class"); vc_add_param('vc_gallery', array('type' => 'dropdown', 'heading' => __('Columns number', 'om_theme'), 'param_name' => 'columns', 'value' => array('1', '2', '3', '4', '5', '6', '7', '8', '9'), 'dependency' => array('element' => 'type', 'value' => array('masonry', 'image_grid')))); vc_add_param('vc_gallery', array('type' => 'dropdown', 'heading' => __('Images width/height ratio', 'om_theme'), 'param_name' => 'ratio', 'value' => array('2:1' => '2:1', '16:9' => '16:9', '3:2' => '3:2', '4:3' => '4:3', '1:1' => '1:1', '3:4' => '3:4', '2:3' => '2:3', '9:16' => '9:16', '1:2' => '1:2'), 'dependency' => array('element' => 'type', 'value' => array('image_grid')))); vc_add_param('vc_gallery', array('type' => 'checkbox', 'heading' => __('Display captions', 'om_theme'), 'param_name' => 'captions', 'value' => array(__('Yes, please', 'om_theme') => 'yes'), 'dependency' => array('element' => 'type', 'value' => array('om', 'sliced', 'masonry', 'image_grid')))); vc_add_param('vc_gallery', array('type' => 'checkbox', 'heading' => __('Use hi-res images', 'om_theme'), 'description' => __('Check this option of you use gallery in a row without padding and the dimendions of images is not enough. Source images also must be high resolution in this case.', 'om_theme'), 'param_name' => 'hires', 'value' => array(__('Yes, please', 'om_theme') => 'yes'), 'dependency' => array('element' => 'type', 'value' => array('sliced', 'masonry', 'image_grid')))); vc_add_param('vc_gallery', 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'))); /** * VC Column */ $tmp = array('type' => 'dropdown', 'heading' => __('Delimiter', 'om_theme'), 'description' => __('Delimiter at right hand side, between columns.', 'om_theme'), 'param_name' => 'delimiter', 'value' => array(__('No', 'om_theme') => '', __('Vertical line', 'om_theme') => 'vline', __('Horisontal line', 'om_theme') => 'hline', __('Dot', 'om_theme') => 'dot', __('Arrow', 'om_theme') => 'rarr')); vc_add_param('vc_column', $tmp); vc_add_param('vc_column_inner', $tmp); /** * Animation */ $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', __('Bounce', 'om_theme') => 'bounce', __('Zoom In', 'om_theme') => 'zoom-in', __('Zoom In Down', 'om_theme') => 'zoom-in-down', __('Zoom In Up', 'om_theme') => 'zoom-in-up', __('Zoom Out', 'om_theme') => 'zoom-out', __('Spin', 'om_theme') => 'spin', __('Spin around Left Top', 'om_theme') => 'spin-lt', __('Spin around Right Top', 'om_theme') => 'spin-rt', __('Flip', 'om_theme') => 'flip', __('Flip X', 'om_theme') => 'flip-x', __('Flip Y', 'om_theme') => 'flip-y'), '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')); $css_animation_delay = array('type' => 'textfield', 'heading' => __('Delay before animation starts (milliseconds)', 'js_composer'), 'param_name' => 'css_animation_delay', 'dependency' => array('element' => 'css_animation', 'not_empty' => true)); vc_add_param('vc_column', $css_animation); vc_add_param('vc_column', $css_animation_delay); vc_add_param('vc_column_inner', $css_animation); vc_add_param('vc_column_inner', $css_animation_delay); vc_add_param('vc_row', $css_animation); vc_add_param('vc_row', $css_animation_delay); vc_add_param('vc_row_inner', $css_animation); vc_add_param('vc_row_inner', $css_animation_delay); WPBMap::mutateParam('vc_btn', $css_animation); WPBMap::mutateParam('vc_column_text', $css_animation); WPBMap::mutateParam('vc_cta', $css_animation); WPBMap::mutateParam('vc_message', array_merge($css_animation, array('admin_label' => false))); WPBMap::mutateParam('vc_single_image', $css_animation); WPBMap::mutateParam('vc_toggle', $css_animation); /** * Toggle */ vc_remove_param('vc_toggle', 'style'); vc_remove_param('vc_toggle', 'color'); vc_remove_param('vc_toggle', 'size'); /** * om_icon_separator */ $tmp = om_wpb_icon_params(); $tmp = array_merge($tmp, array(array('type' => 'dropdown', 'heading' => __('Icon position', 'om_theme'), 'param_name' => 'title_align', 'value' => array(__('Align center', 'js_composer') => 'separator_align_center', __('Align left', 'js_composer') => 'separator_align_left', __('Align right', 'js_composer') => "separator_align_right"), 'description' => __('Select title location.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Color', 'js_composer'), 'param_name' => 'color', 'value' => array_merge(getVcShared('colors'), array(__('Custom color', 'js_composer') => 'custom')), 'std' => 'grey', 'description' => __('Separator color.', 'js_composer'), 'param_holder_class' => 'vc_colored-dropdown'), array('type' => 'colorpicker', 'heading' => __('Custom Color', 'js_composer'), 'param_name' => 'accent_color', 'description' => __('Custom separator color for your element.', 'js_composer'), 'dependency' => array('element' => 'color', 'value' => array('custom'))), array('type' => 'dropdown', 'heading' => __('Style', 'js_composer'), 'param_name' => 'style', 'value' => getVcShared('separator styles'), 'description' => __('Separator style.', 'js_composer')), array('type' => 'dropdown', 'value' => getVcShared('separator border widths'), 'description' => __('Border width in pixels.', 'js_composer'), 'heading' => __('Border width', 'om_theme'), 'param_name' => 'border_width'), array('type' => 'dropdown', 'heading' => __('Element width', 'js_composer'), 'param_name' => 'el_width', 'value' => getVcShared('separator widths'), 'description' => __('Separator element width in percents.', 'js_composer')), 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')))); vc_map_update('om_icon_separator', array('params' => $tmp)); /** * Message box */ $param = WPBMap::getParam('vc_message', 'color'); $tmp = array(); foreach ($param['options'] as $v) { if (!in_array($v['value'], array('alert-info', 'alert-warning', 'alert-success', 'alert-danger'))) { $tmp[] = $v; } } $param['options'] = $tmp; WPBMap::mutateParam('vc_message', $param); $param = WPBMap::getParam('vc_message', 'icon_type'); $param['value'] = array_merge(array_diff($param['value'], array('pixelicons'))); WPBMap::mutateParam('vc_message', $param); $param = WPBMap::getParam('vc_message', 'message_box_color'); $param['value'] = array_merge(array_diff($param['value'], array('alert-info', 'alert-warning', 'alert-success', 'alert-danger'))); WPBMap::mutateParam('vc_message', $param); vc_remove_param('vc_message', 'style'); /** * Single image */ $param = WPBMap::getParam('vc_single_image', 'style'); unset($param['value']['3D Shadow']); WPBMap::mutateParam('vc_single_image', $param); $param = WPBMap::getParam('vc_single_image', 'img_size'); $param['description'] = __('Enter image size. Example: "thumbnail", "medium", "large", "full" or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use "full" size.', 'om_theme'); WPBMap::mutateParam('vc_single_image', $param); /** * Button */ $params = new OMWPBScParams('vc_btn'); $params->remove('custom_background'); $params->remove('custom_text'); $params->remove('shape'); $param = $params->get('style'); $param['value'] = array(__('Classic', 'om_theme') => 'flat', __('Outlined', 'om_theme') => 'outline'); $params->update($param); $param = $params->get('color'); $param['value'] = array_merge(om_wpb_get_std_colors(), array(__('Custom', 'om_theme') => 'custom')); $param['edit_field_class'] = 'vc_col-sm-6 vc_column vc_block_clear'; $params->update($param); $params->add(array('type' => 'colorpicker', 'heading' => __('Custom color', 'js_composer'), 'param_name' => 'custom_color', 'description' => __('Select custom color for button.', 'om_theme'), 'dependency' => array('element' => 'color', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column'), 'color'); $params->add(array('type' => 'dropdown', 'heading' => __('Hover color', 'js_composer'), 'param_name' => 'hover_color', 'description' => __('Select color for button by hover.', 'om_theme'), 'value' => array(__('Auto', 'om_theme') => 'auto', __('Custom', 'om_theme') => 'custom'), 'edit_field_class' => 'vc_col-sm-6 vc_column vc_block_clear'), 'custom_color'); $params->add(array('type' => 'colorpicker', 'heading' => __('Custom hover color', 'js_composer'), 'param_name' => 'hover_custom_color', 'dependency' => array('element' => 'hover_color', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column'), 'hover_color'); $params->add(array('type' => 'dropdown', 'heading' => __('Text color', 'js_composer'), 'param_name' => 'text_color', 'value' => array(__('Default', 'om_theme') => 'auto', __('Custom', 'om_theme') => 'custom'), 'edit_field_class' => 'vc_col-sm-6 vc_column vc_block_clear'), 'hover_custom_color'); $params->add(array('type' => 'colorpicker', 'heading' => __('Custom text color', 'js_composer'), 'param_name' => 'text_custom_color', 'dependency' => array('element' => 'text_color', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column'), 'text_color'); $params->add(array('type' => 'dropdown', 'heading' => __('Hover text color', 'js_composer'), 'param_name' => 'hover_text_color', 'value' => array(__('Default', 'om_theme') => 'auto', __('Custom', 'om_theme') => 'custom'), 'edit_field_class' => 'vc_col-sm-6 vc_column vc_block_clear'), 'text_custom_color'); $params->add(array('type' => 'colorpicker', 'heading' => __('Custom hover text color', 'js_composer'), 'param_name' => 'hover_text_custom_color', 'dependency' => array('element' => 'hover_text_color', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column'), 'hover_text_color'); $param = $params->get('size'); $param['value']['XLarge'] = 'xlg'; $params->update($param); $params->add(array('type' => 'dropdown', 'heading' => __('Icon color', 'js_composer'), 'param_name' => 'icon_color', 'value' => array(__('Default', 'om_theme') => 'auto', __('Custom', 'om_theme') => 'custom'), 'dependency' => array('element' => 'add_icon', 'value' => 'true'), 'edit_field_class' => 'vc_col-sm-6 vc_column vc_block_clear'), 'i_align'); $params->add(array('type' => 'colorpicker', 'heading' => __('Custom icon color', 'js_composer'), 'param_name' => 'icon_custom_color', 'dependency' => array('element' => 'icon_color', 'value' => array('custom')), 'edit_field_class' => 'vc_col-sm-6 vc_column'), 'icon_color'); $param = $params->get('i_type'); $param['value'] = om_wpb_remove_pixel_icons($param['value']); $params->update($param); $params->add(array('type' => 'om_get_code', 'heading' => __('Get code', 'om_theme'), 'param_name' => 'code', 'description' => __('If you wish to use button shortcode somewhere out of Visual Composer or insert it into text inline, you can generate the code which you can use separately.', 'js_composer'))); $params->save(); /** * CTA Button */ $params = new OMWPBScParams('vc_cta'); $params->remove('use_custom_fonts_h2'); $params->removeIntegratedShortcode('vc_custom_heading', 'h2_'); $params->remove('use_custom_fonts_h4'); $params->removeIntegratedShortcode('vc_custom_heading', 'h4_'); $params->remove('shape'); $params->remove('color'); $param = $params->get('style'); $param['value'] = array(__('Classic', 'om_theme') => 'classic', __('Outline', 'om_theme') => 'outline'); $params->update($param); $param = $params->get('custom_background'); unset($param['dependency']); $params->update($param); $param = $params->get('custom_text'); unset($param['dependency']); $params->update($param); $param = $params->get('add_button'); foreach ($param['value'] as $k => $v) { if ($v == 'top') { unset($param['value'][$k]); break; } } $params->update($param); $params->remove('add_icon'); $params->remove('i_on_border'); $params->removeIntegratedShortcode('vc_icon', 'i_'); $params->save(); /** * Progress Bars */ vc_remove_param('vc_progress_bar', 'el_class'); vc_add_param('vc_progress_bar', array('type' => 'dropdown', 'heading' => __('Titles color', 'js_composer'), 'param_name' => 'titles_color', 'value' => array(__('Default', 'om_theme') => 'auto', __('Custom', 'om_theme') => 'custom'))); vc_add_param('vc_progress_bar', array('type' => 'colorpicker', 'heading' => __('Titles custom color', 'js_composer'), 'param_name' => 'titles_custom_color', 'dependency' => array('element' => 'titles_color', 'value' => array('custom')))); vc_add_param('vc_progress_bar', 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'))); /** * Pie charts */ vc_remove_param('vc_pie', 'el_class'); vc_remove_param('vc_pie', 'label_value'); vc_remove_param('vc_pie', 'units'); vc_remove_param('vc_pie', 'color'); vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Pie label inside circle', 'om_theme'), 'param_name' => 'label_type', 'value' => array(__('Number', 'om_theme') => 'number', __('Display widget title', 'om_theme') => 'title', __('Icon', 'om_theme') => 'icon'))); vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Pie label value', 'js_composer'), 'param_name' => 'label_value', 'description' => __('Input integer value for label. If empty "Pie value" will be used.', 'js_composer'), 'value' => '', 'dependency' => array('element' => 'label_type', 'value' => array('number')))); vc_add_param('vc_pie', array('type' => 'textfield', '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'), 'dependency' => array('element' => 'label_type', 'value' => array('number')))); $tmp = om_wpb_icon_params(false, array('element' => 'label_type', 'value' => array('icon'))); foreach ($tmp as $v) { vc_add_param('vc_pie', $v); } vc_add_param('vc_pie', array('type' => 'dropdown', 'heading' => __('Bar color', 'js_composer'), 'param_name' => 'color', 'value' => 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', 'om_theme') => 'custom'), 'description' => __('Select pie chart color.', 'js_composer'), 'admin_label' => true, 'param_holder_class' => 'vc_colored-dropdown')); vc_add_param('vc_pie', array('type' => 'colorpicker', 'heading' => __('Custom color', 'js_composer'), 'param_name' => 'custom_color', 'dependency' => array('element' => 'color', 'value' => array('custom')))); vc_add_param('vc_pie', array('type' => 'textfield', 'heading' => __('Width', 'js_composer'), 'param_name' => 'width', 'description' => __('Leave this field blank for auto width or specify maximum width', 'om_theme'))); vc_add_param('vc_pie', 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'))); /** * GMaps */ vc_remove_param('vc_gmaps', 'link'); vc_remove_param('vc_gmaps', 'size'); vc_remove_param('vc_gmaps', 'el_class'); vc_add_param('vc_gmaps', array('type' => 'textarea_safe', 'heading' => __('Map embed iframe', 'js_composer'), 'param_name' => 'link', 'description' => sprintf(__('Visit %s or %s to create your map. 1) Find location 2) Click "Share" and make sure map is public on the web 3) Copy iframe code and paste it here.', 'js_composer'), '<a href="https://maps.google.com/" target="_blank">Google maps</a>', '<a href="https://mapsengine.google.com/" target="_blank">Google Maps Engine</a>'))); vc_add_param('vc_gmaps', array('type' => 'textfield', 'heading' => __('Map height', 'js_composer'), 'param_name' => 'size', 'admin_label' => true, 'description' => __('Enter map height in pixels. Example: 200 or leave it empty to make map responsive.', 'js_composer'))); vc_add_param('vc_gmaps', 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'))); /** * Adding "Theme Color" option to some shortcodes. */ $theme_color = array(__('Theme Hightlight Color', 'om_theme') => 'om-theme-color'); $param = WPBMap::getParam('vc_separator', 'color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_separator', $param); $param = WPBMap::getParam('vc_text_separator', 'color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_text_separator', $param); $param = WPBMap::getParam('om_icon_separator', 'color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('om_icon_separator', $param); $param = WPBMap::getParam('vc_single_image', 'border_color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_single_image', $param); $param = WPBMap::getParam('vc_btn', 'color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_btn', $param); $param = WPBMap::getParam('vc_progress_bar', 'bgcolor'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_progress_bar', $param); $param = WPBMap::getParam('vc_pie', 'color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_pie', $param); $param = WPBMap::getParam('vc_message', 'message_box_color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_message', $param); $param = WPBMap::getParam('vc_icon', 'color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_icon', $param); $param = WPBMap::getParam('vc_icon', 'background_color'); $param['value'] = array_merge($theme_color, $param['value']); WPBMap::mutateParam('vc_icon', $param); /** * Update some integrated shortcodes */ $params = new OMWPBScParams('vc_cta'); $params->updateIntegratedShortcode('vc_btn', 'btn_', __('Button', 'js_composer'), false, array('element' => 'add_button', 'not_empty' => true)); $params->remove('btn_code'); $params->save(); }
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); }
//*********************************************************************** // Toggle //*********************************************************************** // add custom animation $param = WPBMap::getParam('vc_toggle', 'css_animation'); $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" => "")); //***********************************************************************
/** * 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); } }
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); }
function vc_parse_options_string( $string, $tag, $param ) { $options = $option_settings_list = array(); $settings = WPBMap::getParam( $tag, $param ); foreach ( preg_split( '/\|/', $string ) as $value ) { if ( preg_match( '/\:/', $value ) ) { $split = preg_split( '/\:/', $value ); $option_name = $split[0]; $option_settings = $option_settings_list[$option_name] = vc_param_options_get_settings( $option_name, $settings['options'] ); if ( isset( $option_settings['type'] ) && $option_settings['type'] === 'checkbox' ) { $option_value = array_map( 'vc_param_options_parse_values', preg_split( '/\,/', $split[1] ) ); } else { $option_value = rawurldecode( $split[1] ); } $options[$option_name] = $option_value; } } if ( isset( $settings['options'] ) ) { foreach ( $settings['options'] as $setting_option ) { if ( $setting_option['type'] !== 'separator' && isset( $setting_option['value'] ) && empty( $options[$setting_option['name']] ) ) { $options[$setting_option['name']] = $setting_option['type'] === 'checkbox' ? preg_split( '/\,/', $setting_option['value'] ) : $setting_option['value']; } if ( isset( $setting_option['name'] ) && isset( $options[$setting_option['name']] ) && isset( $setting_option['value_type'] ) ) { if ( $setting_option['value_type'] === 'integer' ) { $options[$setting_option['name']] = (int)$options[$setting_option['name']]; } elseif ( $setting_option['value_type'] === 'float' ) { $options[$setting_option['name']] = (float)$options[$setting_option['name']]; } elseif ( $setting_option['value_type'] === 'boolean' ) { $options[$setting_option['name']] = (boolean)$options[$setting_option['name']]; } } } } return $options; }
function add_vc_text_separator_no_border() { $param = WPBMap::getParam('vc_text_separator', 'style'); $param['value'][__('No Border', 'mr_tailor')] = 'no_border'; WPBMap::mutateParam('vc_text_separator', $param); }
function parseShortcodesString( $content, $is_container = false, $parent_id = false ) { $string = ''; preg_match_all( '/' . self::shortcodesRegexp() . '/', $content, $found ); if ( count( $found[2] ) == 0 ) { return $is_container && strlen( $content ) > 0 ? $this->parseShortcodesString( '[vc_column_text]' . $content . '[/vc_column_text]', false, $parent_id ) : $content; return $content; } foreach ( $found[2] as $index => $s ) { $id = md5( time() . '-' . $this->tag_index ++ ); $content = $found[5][$index]; $shortcode = array( 'tag' => $s, 'attrs_query' => $found[3][$index], 'attrs' => shortcode_parse_atts( $found[3][$index] ), 'id' => $id, 'parent_id' => $parent_id ); if ( WPBMap::getParam( $s, 'content' ) !== false ) $shortcode['attrs']['content'] = $content; $this->post_shortcodes[] = $shortcode; $string .= $this->toString( $shortcode, $content ); } return $string; }
"Top" => "top", "Bottom" => "bottom", "Scale" => "scale", "Fade" => "fade" ), "description" => "" ) ) ) ); //*********************************************************************** // Pie //*********************************************************************** //Get current values stored in the color param in "Call to Action" element $param = WPBMap::getParam('vc_pie', 'color'); //Append new value to the 'value' array $param['value'] = '#f7f7f7'; $param['type'] = 'colorpicker'; //Finally "mutate" param with new values WPBMap::mutateParam('vc_pie', $param); // add appearance dropdown vc_add_param("vc_pie", array( "type" => "dropdown", "class" => "", "heading" => __("Appearance", LANGUAGE_ZONE), "admin_label" => true, "param_name" => "appearance", "value" => array( "Pie chart (default)" => "default",
/** * Button */ private function elementButton() { // color $param = WPBMap::getParam('vc_button', 'color'); $param['value'] = array('Default' => 'btn-default', 'Primary' => 'btn-success', 'Success' => 'btn-success', 'Info' => 'btn-warning', 'Danger' => 'btn-danger', 'Link' => 'btn-link'); $param['heading'] = 'Type'; WPBMap::mutateParam('vc_button', $param); // icon $param = WPBMap::getParam('vc_button', 'icon'); $param['type'] = 'textfield'; $param['value'] = ''; WPBMap::mutateParam('vc_button', $param); // size $param = WPBMap::getParam('vc_button', 'size'); $param['value'] = array('Default' => '', 'Large' => 'btn-lg', 'Small' => 'btn-sm', 'Extra small' => 'btn-xs'); WPBMap::mutateParam('vc_button', $param); }
function willow_custom_visual_composer() { $add_css_animation = array('type' => 'dropdown', 'heading' => __('CSS Animation', 'js_composer'), 'param_name' => 'css_animation', 'admin_label' => true, 'value' => array_merge(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'), willow_get_animate_css()), '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')); $add_icon = array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Icon', 'willow'), 'param_name' => 'icon', 'value' => array_merge(array(__('No Icon', 'willow') => ''), willow_get_icons())); /** * Edit Content Element: Row */ vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Section ID', 'willow'), 'description' => __('Used in One Page Scrolling Navigation. Please fill without "#".', 'willow'), 'param_name' => 'id')); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Background Mode', 'willow'), 'param_name' => 'bg_mode', 'value' => array(__('Image', 'willow') => 'images', __('Google Map', 'willow') => 'googlemap'))); vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Google Map Latitude / Longitude', 'willow'), 'description' => __('Comma separated, e.g. "-7.9812985, 112.6319264"', 'willow'), 'param_name' => 'gmap_lat_lng', 'value' => '-7.9812985, 112.6319264', 'dependency' => array('element' => 'bg_mode', 'value' => array('googlemap')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Google Map Zoom', 'willow'), 'param_name' => 'gmap_zoom', 'value' => array('2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20', '21' => '21'), 'dependency' => array('element' => 'bg_mode', 'value' => array('googlemap')))); vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Google Map Marker Latitude / Longitude', 'willow'), 'description' => __('Comma separated, e.g. "-7.9812985, 112.6319264". Leave if blank to disable marker', 'willow'), 'param_name' => 'gmap_marker_lat_lng', 'value' => '-7.9812985, 112.6319264', 'dependency' => array('element' => 'bg_mode', 'value' => array('googlemap')))); vc_add_param('vc_row', array('type' => 'attach_image', 'heading' => __('Background Images', 'willow'), 'param_name' => 'bg_images', 'description' => __('It is recommended not to configure the Background Image on the Design Options Tab, please configure your background image here instead.', 'willow'), 'dependency' => array('element' => 'bg_mode', 'value' => array('images')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Background Repeat', 'willow'), 'param_name' => 'bg_image_repeat', 'value' => array(__('Default', 'willow') => '', __('Cover', 'willow') => 'cover', __('Contain', 'willow') => 'contain', __('No Repeat', 'willow') => 'no-repeat'), 'description' => __('It is recommended not to configure the Background Repeat on the Design Options Tab, please configure your background repeat here instead.', 'willow'), 'dependency' => array('element' => 'bg_mode', 'value' => array('images')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Background Overlay', 'willow'), 'param_name' => 'bg_overlay', 'value' => array(__('none', 'willow') => '', __('black overlay', 'willow') => 'black-overlay', __('dotted overlay', 'willow') => 'dotted-overlay'), 'dependency' => array('element' => 'bg_mode', 'value' => array('images')))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Enable Parallax Background', 'willow'), 'param_name' => 'parallax', 'value' => array(__('false', 'willow') => 'false', __('true', 'willow') => 'true'))); vc_add_param('vc_row', array('type' => 'dropdown', 'heading' => __('Separator', 'willow'), 'param_name' => 'separator', 'value' => array(__('none', 'willow') => 'none', __('single-line', 'willow') => 'single-line', __('triangle-in', 'willow') => 'triangle-in', __('triangle-out', 'willow') => 'triangle-out'))); // vc_map_update( 'vc_row', array( // 'admin_enqueue_js' => array( get_template_directory_uri() . '/vc_extends/assets/js/vc-willow-row.js' ), // 'js_view' => 'VcWillowRowView' // ) ); $vc_column_text_css_animation = WPBMap::getParam('vc_column_text', 'css_animation'); $vc_column_text_css_animation = $add_css_animation; WPBMap::mutateParam('vc_column_text', $vc_column_text_css_animation); $vc_message_css_animation = WPBMap::getParam('vc_message', 'css_animation'); $vc_message_css_animation = $add_css_animation; WPBMap::mutateParam('vc_message', $vc_message_css_animation); $vc_toggle_css_animation = WPBMap::getParam('vc_toggle', 'css_animation'); $vc_toggle_css_animation = $add_css_animation; WPBMap::mutateParam('vc_toggle', $vc_toggle_css_animation); $vc_single_image_css_animation = WPBMap::getParam('vc_single_image', 'css_animation'); $vc_single_image_css_animation = $add_css_animation; WPBMap::mutateParam('vc_single_image', $vc_single_image_css_animation); $vc_cta_button_css_animation = WPBMap::getParam('vc_cta_button', 'css_animation'); $vc_cta_button_css_animation = $add_css_animation; WPBMap::mutateParam('vc_cta_button', $vc_cta_button_css_animation); $vc_cta_button2_css_animation = WPBMap::getParam('vc_cta_button2', 'css_animation'); $vc_cta_button2_css_animation = $add_css_animation; WPBMap::mutateParam('vc_cta_button2', $vc_cta_button2_css_animation); /** * Add Content Element: Big Title */ require_once get_template_directory() . '/vc_extends/willow_big_title.php'; vc_map(array('name' => __('Big Title', 'willow'), 'base' => 'vc_willow_big_title', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Title', 'willow'), 'param_name' => 'title'), 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'))))); /** * Add Content Element: Blog Grid */ require_once get_template_directory() . '/vc_extends/willow_blog_grid.php'; vc_map(array('name' => __('Blog Grid', 'willow'), 'base' => 'vc_willow_blog_grid', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Number of items', 'willow'), 'param_name' => 'count', 'value' => 8, 'description' => __('-1 to show all', 'willow')), array('type' => 'textarea', 'holder' => 'div', 'heading' => __('Only shows specified categori(es)', 'willow'), 'param_name' => 'category', 'description' => __('Comma separated SLUG of the categori(es).', 'js_composer')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Number of columns', 'willow'), 'param_name' => 'columns', 'value' => array('2' => 2, '3' => 3, '4' => 4)), $add_css_animation, 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'))))); /** * Add Content Element: Button */ require_once get_template_directory() . '/vc_extends/willow_button.php'; vc_map(array('name' => __('Button (Willow Style)', 'willow'), 'base' => 'vc_willow_button', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Text', 'willow'), 'param_name' => 'text', 'value' => __('Anchor Text', 'willow')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Link URL', 'willow'), 'param_name' => 'link', 'value' => '#'), $add_icon, array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Style', 'willow'), 'param_name' => 'style', 'value' => array(__('default', 'willow') => 'btn-default', __('black', 'willow') => 'btn-black', __('white', 'willow') => 'btn-white', __('primary', 'willow') => 'btn-primary', __('success', 'willow') => 'btn-success', __('info', 'willow') => 'btn-info', __('warning', 'willow') => 'btn-warning', __('danger', 'willow') => 'btn-danger', __('link', 'willow') => 'btn-link')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Size', 'willow'), 'param_name' => 'size', 'value' => array(__('normal', 'willow') => '', __('large', 'willow') => 'btn-lg', __('small', 'willow') => 'btn-sm', __('xs', 'willow') => 'btn-xs')), $add_css_animation, 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'))))); /** * Add Content Element: Counter */ require_once get_template_directory() . '/vc_extends/willow_counter.php'; vc_map(array('name' => __('Counter', 'willow'), 'base' => 'vc_willow_counter', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Caption', 'willow'), 'param_name' => 'caption'), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Start', 'willow'), 'param_name' => 'start', 'value' => 0), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('End (Value)', 'willow'), 'param_name' => 'end', 'value' => 100), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Prefix', 'willow'), 'param_name' => 'prefix', 'description' => __('String before number', 'willow')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Suffix', 'willow'), 'param_name' => 'suffix', 'description' => __('String after number', 'willow')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Decimals', 'willow'), 'param_name' => 'decimals', 'value' => 0, 'description' => __('Number of decimals. Positive integer only', 'willow')), $add_icon, $add_css_animation, 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'))))); /** * Add Content Element: Portfolio Grid */ if (class_exists('VP_Portfolio')) { require_once get_template_directory() . '/vc_extends/willow_portfolio_grid.php'; vc_map(array('name' => __('Portfolio Grid', 'willow'), 'base' => 'vc_willow_portfolio_grid', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Number of items', 'willow'), 'param_name' => 'count', 'value' => 9, 'description' => __('-1 to show all', 'willow')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Number of columns', 'willow'), 'param_name' => 'columns', 'value' => array('2' => 2, '3' => 3, '4' => 4)), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Enable Category Filter', 'willow'), 'param_name' => 'filter', 'value' => array(__('true', 'willow') => 'true', __('false', 'willow') => 'false')), array('type' => 'textarea', 'holder' => 'div', 'heading' => __('Only shows specified categori(es)', 'willow'), 'param_name' => 'category', 'description' => __('Comma separated SLUG of the categori(es).', 'js_composer')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Enable Pagination', 'willow'), 'param_name' => 'pagination', 'value' => array(__('false', 'willow') => 'false', __('true', 'willow') => 'true')), $add_css_animation, 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'))))); } /** * Add Content Element: Progress Bar */ require_once get_template_directory() . '/vc_extends/willow_progress_bar.php'; vc_map(array('name' => __('Progress Bar', 'willow'), 'base' => 'vc_willow_progress_bar', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Caption', 'willow'), 'param_name' => 'caption'), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Value', 'willow'), 'param_name' => 'value', 'description' => __('Valid value from 0 to 100, and without "%"', 'willow')), array('type' => 'colorpicker', 'holder' => 'div', 'heading' => __('Custom Color', 'willow'), 'param_name' => 'color'), 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'))))); /** * Add Content Element: Quotes Carousel */ require_once get_template_directory() . '/vc_extends/willow_quotes_carousel.php'; require_once get_template_directory() . '/vc_extends/willow_quote.php'; vc_map(array('name' => __('Quotes Carousel', 'willow'), 'base' => 'vc_willow_quotes_carousel', 'admin_enqueue_js' => array(get_template_directory_uri() . '/vc_extends/assets/js/vc-willow-quotes-carousel.js'), 'admin_enqueue_css' => array(get_template_directory_uri() . '/vc_extends/assets/css/quotes-carousel.css'), 'category' => __('Content', 'js_composer'), 'show_settings_on_create' => false, 'is_container' => true, 'params' => array(array('type' => 'textfield', 'heading' => __('Auto Rotate Duration (mili seconds)', 'willow'), 'param_name' => 'auto_rotate', 'description' => __('Fill 0 to disable', 'willow'), 'value' => 0), 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'))), 'custom_markup' => ' <div class="wpb_holder clearfix vc_container_for_children"> %content% </div> <div class="tab_controls"> <button class="add_tab" title="' . __('Add quote', 'willow') . '">' . __('Add quote', 'willow') . '</button> </div> ', 'default_content' => ' [vc_willow_quote cite="John Doe - Company, Inc."]' . __('<p>This is quote content. Click edit button to change this text.</p>', 'willow') . '[/vc_willow_quote] [vc_willow_quote cite="Jane Doe - Company, Inc."]' . __('<p>This is quote content. Click edit button to change this text.</p>', 'willow') . '[/vc_willow_quote] ', 'js_view' => 'WillowQuotesCarousel')); vc_map(array('name' => __('Quote', 'willow'), 'base' => 'vc_willow_quote', 'content_element' => false, 'params' => array(array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Content', 'willow'), 'param_name' => 'content', 'value' => __('<p>This is quote content. Click edit button to change this text.</p>', 'willow')), array('type' => 'textfield', 'heading' => __('Cite', 'willow'), 'param_name' => 'cite', 'description' => __('Cite.', 'willow')), 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'))))); /** * Add Content Element: Section Heading */ require_once get_template_directory() . '/vc_extends/willow_section_heading.php'; vc_map(array('name' => __('Section Heading', 'willow'), 'base' => 'vc_willow_section_heading', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Large Heading', 'willow'), 'param_name' => 'large_heading'), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Small Heading', 'willow'), 'param_name' => 'small_heading'), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Text Alignment', 'willow'), 'param_name' => 'align', 'value' => array(__('center', 'willow') => 'center', __('left', 'willow') => 'left', __('right', 'willow') => 'right')), $add_css_animation, 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'))))); /** * Add Content Element: Service Block */ require_once get_template_directory() . '/vc_extends/willow_service_block.php'; vc_map(array('name' => __('Service Block', 'willow'), 'base' => 'vc_willow_service_block', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Heading Text', 'willow'), 'param_name' => 'heading', 'value' => __('Service Heading', 'willow')), array('type' => 'dropdown', 'holder' => 'div', 'heading' => __('Style', 'willow'), 'param_name' => 'style', 'value' => array('style-1' => 'style-1', 'style-2' => 'style-2')), $add_icon, array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Content', 'willow'), 'param_name' => 'content', 'value' => __('<p>I am a service block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>', 'willow')), $add_css_animation, 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'))))); /** * Add Content Element: Spacer */ require_once get_template_directory() . '/vc_extends/willow_spacer.php'; vc_map(array('name' => __('Spacer', 'willow'), 'base' => 'vc_willow_spacer', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Size (px / em / %)', 'willow'), 'param_name' => 'size'), 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'))))); /** * Add Content Element: Team Member Block */ require_once get_template_directory() . '/vc_extends/willow_team_member_block.php'; vc_map(array('name' => __('Team Member Block', 'willow'), 'base' => 'vc_willow_team_member_block', 'category' => __('Content', 'js_composer'), 'params' => array(array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Name', 'willow'), 'param_name' => 'name', 'value' => __('John Doe', 'willow')), array('type' => 'attach_image', 'holder' => 'div', 'heading' => __('Photo', 'willow'), 'param_name' => 'photo', 'description' => __('Minimum size recommended: 600px width image', 'willow')), array('type' => 'textfield', 'holder' => 'div', 'heading' => __('Position', 'willow'), 'param_name' => 'position'), array('type' => 'textarea_html', 'holder' => 'div', 'heading' => __('Content', 'willow'), 'param_name' => 'content', 'value' => __('<p>John Doe is a designer who works remotely from Birmingham, AL. A graduate of Ole Miss, where he played.</p>', 'willow')), array('type' => 'textarea', 'holder' => 'div', 'heading' => __('Social Media', 'willow'), 'description' => __('Line break separated. See all available social media types <a href="http://fontawesome.io/icons/#brand">here</a>. Input format is social_media_type: your_url. For example, facebook: http://facebook.com.', 'willow'), 'param_name' => 'socmed', 'value' => __("facebook : http://facebook.com\ntwitter : http://twitter.com\nlinkedin : http://linkedin.com", 'willow')), $add_css_animation, 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'))))); }
<?php extract(shortcode_atts(array('height' => WPBMap::getParam('vc_empty_space', 'height'), 'el_class' => '', 'background_image' => '', 'image_repeat' => ''), $atts)); $class = "vc_empty_space "; $pattern = '/^(\\d*(?:\\.\\d+)?)\\s*(px|\\%|in|cm|mm|em|rem|ex|pt|pc|vw|vh|vmin|vmax)?$/'; // allowed metrics: http://www.w3schools.com/cssref/css_units.asp $regexr = preg_match($pattern, $height, $matches); $value = isset($matches[1]) ? (double) $matches[1] : (double) WPBMap::getParam('vc_empty_space', 'height'); $unit = isset($matches[2]) ? $matches[2] : 'px'; $height = $value . $unit; $inline_css = (double) $height >= 0.0 ? ' style="height: ' . $height . '"' : ''; $class .= $this->getExtraClass($el_class); $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts); $image = ""; if ($background_image != "") { if (is_numeric($background_image)) { $image_src = wp_get_attachment_url($background_image); } $image .= 'style="background-image:url(' . $image_src . ');'; if ($image_repeat != "") { $image .= 'background-repeat:' . $image_repeat . ';"'; } } ?> <div class="<?php echo esc_attr(trim($css_class)); ?> " <?php echo $inline_css; ?> ><span
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); }