/** * Call all stored activities. * * Called by init method. List of activities stored by $init_activity are created by other objects called after * initialization. * * @since 4.2 * @access public */ protected function callActivities() { while ( $activity = each( $this->init_activity ) ) { list( $object, $method, $params ) = $activity[1]; if ( $object == 'mapper' ) { switch ( $method ) { case 'map': WPBMap::map( $params['name'], $params['attributes'] ); break; case 'drop_param': WPBMap::dropParam( $params['name'], $params['attribute_name'] ); break; case 'add_param': WPBMap::addParam( $params['name'], $params['attribute'] ); break; case 'mutate_param': WPBMap::mutateParam( $params['name'], $params['attribute'] ); break; case 'drop_shortcode': WPBMap::dropShortcode( $params['name'] ); break; case 'modify': WPBMap::modify( $params['name'], $params['setting_name'], $params['value'] ); break; } } } }
/** * Shorthand function for WPBMap::mutateParam * @param $name * @param array $attribute */ function vc_update_shortcode_param($name, $attribute = array()) { return WPBMap::mutateParam($name, $attribute); }
/** * 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); }
/** * 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); } }
"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", "Counter" => "counter" ), "description" => "" ));
//*********************************************************************** // 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_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); }
public function callElementActivities($tag) { do_action('vc_mapper_call_activities_before'); if (isset($this->element_activities[$tag])) { while ($activity = each($this->element_activities[$tag])) { list($method, $params) = $activity[1]; switch ($method) { case 'drop_param': WPBMap::dropParam($params['name'], $params['attribute_name']); break; case 'add_param': WPBMap::addParam($params['name'], $params['attribute']); break; case 'mutate_param': WPBMap::mutateParam($params['name'], $params['attribute']); break; case 'drop_shortcode': WPBMap::dropShortcode($params['name']); break; case 'modify': WPBMap::modify($params['name'], $params['setting_name'], $params['value']); break; } } } }
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 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'))))); }
$row_update = array('weight' => 100); $rev_update = array('weight' => 17); $c_update = array('weight' => 13); $no_animation = array('admin_label' => false); vc_map_update('vc_row', $row_update); vc_map_update('vc_column_text', $row_update); vc_map_update('vc_row', $row_update); vc_map_update('vc_column_text', $no_animation); vc_map_update('rev_slider_vc', $rev_update); vc_map_update('contact-form-7', $c_update); $param = WPBMap::getParam('vc_column_text', 'css_animation'); $param['admin_label'] = false; WPBMap::mutateParam('vc_column_text', $param); $param2 = WPBMap::getParam('vc_message', 'css_animation'); $param['admin_label'] = false; WPBMap::mutateParam('vc_message', $param); } if (function_exists('vc_remove_element')) { vc_remove_element("vc_teaser_grid"); vc_remove_element("vc_posts_slider"); vc_remove_element("vc_images_carousel"); vc_remove_element("vc_progress_bar"); vc_remove_element("vc_carousel"); // vc_remove_element("vc_button"); } if (function_exists('vc_remove_param')) { vc_remove_param('vc_column_text', 'css_animation'); vc_remove_param('vc_message', 'css_animation'); vc_remove_param('vc_toggle', 'css_animation'); vc_remove_param('vc_single_image', 'css_animation'); }