Current path: home/webdevt/www/wdp/wp-content/themes/quadric/framework/modules/visualcomposer/
?? Go up: /home/webdevt/www/wdp/wp-content/themes/quadric/framework/modules
<?php
/**
* Force Visual Composer to initialize as "built into the theme". This will hide certain tabs under the Settings->Visual Composer page
*/
if(function_exists('vc_set_as_theme')) {
vc_set_as_theme(true);
}
/**
* Change path for overridden templates
*/
if(function_exists('vc_set_shortcodes_templates_dir')) {
$dir = EDGE_ROOT_DIR . '/vc-templates';
vc_set_shortcodes_templates_dir( $dir );
}
if ( ! function_exists('edgtf_quadric_configure_visual_composer') ) {
/**
* Configuration for Visual Composer
* Hooks on vc_after_init action
*/
function edgtf_quadric_configure_visual_composer() {
/**
* Removing shortcodes
*/
vc_remove_element("vc_wp_search");
vc_remove_element("vc_wp_meta");
vc_remove_element("vc_wp_recentcomments");
vc_remove_element("vc_wp_calendar");
vc_remove_element("vc_wp_pages");
vc_remove_element("vc_wp_tagcloud");
vc_remove_element("vc_wp_custommenu");
vc_remove_element("vc_wp_text");
vc_remove_element("vc_wp_posts");
vc_remove_element("vc_wp_links");
vc_remove_element("vc_wp_categories");
vc_remove_element("vc_wp_archives");
vc_remove_element("vc_wp_rss");
vc_remove_element("vc_teaser_grid");
vc_remove_element("vc_button");
vc_remove_element("vc_cta_button");
vc_remove_element("vc_cta_button2");
vc_remove_element("vc_message");
vc_remove_element("vc_tour");
vc_remove_element("vc_progress_bar");
vc_remove_element("vc_pie");
vc_remove_element("vc_posts_slider");
vc_remove_element("vc_toggle");
vc_remove_element("vc_images_carousel");
vc_remove_element("vc_posts_grid");
vc_remove_element("vc_carousel");
vc_remove_element("vc_gmaps");
vc_remove_element("vc_cta");
vc_remove_element("vc_round_chart");
vc_remove_element("vc_line_chart");
vc_remove_element("vc_tta_accordion");
vc_remove_element("vc_tta_tour");
vc_remove_element("vc_tta_tabs");
vc_remove_element("vc_separator");
vc_remove_element("vc_section");
/**
* Remove unused parameters
*/
if (function_exists('vc_remove_param')) {
vc_remove_param('vc_row', 'full_width');
vc_remove_param('vc_row', 'full_height');
vc_remove_param('vc_row', 'content_placement');
vc_remove_param('vc_row', 'video_bg');
vc_remove_param('vc_row', 'video_bg_url');
vc_remove_param('vc_row', 'video_bg_parallax');
vc_remove_param('vc_row', 'parallax');
vc_remove_param('vc_row', 'parallax_image');
vc_remove_param('vc_row', 'gap');
vc_remove_param('vc_row', 'columns_placement');
vc_remove_param('vc_row', 'equal_height');
vc_remove_param('vc_row_inner', 'gap');
vc_remove_param('vc_row_inner', 'content_placement');
vc_remove_param('vc_row_inner', 'equal_height');
vc_remove_param('vc_row', 'parallax_speed_video');
vc_remove_param('vc_row', 'parallax_speed_bg');
vc_remove_param('vc_row_inner', 'disable_element');
vc_remove_param('vc_row', 'disable_element');
vc_remove_param('vc_row', 'css_animation');
}
}
add_action('vc_after_init', 'edgtf_quadric_configure_visual_composer');
}
if ( ! function_exists('edgtf_quadric_configure_visual_composer_grid_elemets') ) {
/**
* Configuration for Visual Composer for Grid Elements
* Hooks on vc_after_init action
*/
function edgtf_quadric_configure_visual_composer_grid_elemets() {
/**
* Remove Grid Elements if grid elements disabled
*/
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');
vc_remove_element('vc_icon');
vc_remove_element('vc_button2');
vc_remove_element("vc_custom_heading");
/**
* Remove unused parameters from grid elements
*/
if (function_exists('vc_remove_param')) {
vc_remove_param('vc_basic_grid', 'button_style');
vc_remove_param('vc_basic_grid', 'button_color');
vc_remove_param('vc_basic_grid', 'button_size');
vc_remove_param('vc_basic_grid', 'filter_color');
vc_remove_param('vc_basic_grid', 'filter_style');
vc_remove_param('vc_media_grid', 'button_style');
vc_remove_param('vc_media_grid', 'button_color');
vc_remove_param('vc_media_grid', 'button_size');
vc_remove_param('vc_media_grid', 'filter_color');
vc_remove_param('vc_media_grid', 'filter_style');
vc_remove_param('vc_masonry_grid', 'button_style');
vc_remove_param('vc_masonry_grid', 'button_color');
vc_remove_param('vc_masonry_grid', 'button_size');
vc_remove_param('vc_masonry_grid', 'filter_color');
vc_remove_param('vc_masonry_grid', 'filter_style');
vc_remove_param('vc_masonry_media_grid', 'button_style');
vc_remove_param('vc_masonry_media_grid', 'button_color');
vc_remove_param('vc_masonry_media_grid', 'button_size');
vc_remove_param('vc_masonry_media_grid', 'filter_color');
vc_remove_param('vc_masonry_media_grid', 'filter_style');
vc_remove_param('vc_basic_grid', 'paging_color');
vc_remove_param('vc_basic_grid', 'arrows_color');
vc_remove_param('vc_media_grid', 'paging_color');
vc_remove_param('vc_media_grid', 'arrows_color');
vc_remove_param('vc_masonry_grid', 'paging_color');
vc_remove_param('vc_masonry_grid', 'arrows_color');
vc_remove_param('vc_masonry_media_grid', 'paging_color');
vc_remove_param('vc_masonry_media_grid', 'arrows_color');
}
}
add_action('vc_after_init', 'edgtf_quadric_configure_visual_composer_grid_elemets');
}
if ( ! function_exists('edgtf_quadric_configure_visual_composer_frontend_editor') ) {
/**
* Configuration for Visual Composer FrontEnd Editor
* Hooks on vc_after_init action
*/
function edgtf_quadric_configure_visual_composer_frontend_editor() {
/**
* Remove frontend editor
*/
if(function_exists('vc_disable_frontend')){
vc_disable_frontend();
}
}
add_action('vc_after_init', 'edgtf_quadric_configure_visual_composer_frontend_editor');
}
if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
class WPBakeryShortCode_Edgtf_Elements_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Elements_Holder_Item extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Tabs extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Tab extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Accordion extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Accordion_Tab extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Pricing_Tables extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Icon_Slider_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Icon_Slider_Item extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Clients extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Content_Slider_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Content_Slider_Item extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Zooming_Slider_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Zooming_Slider_Item extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Background_Revealing_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Process_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Process_Holder_Item extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Floating_Slider extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Floating_Slide extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Floating_Slide_Element extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Team_Slider_Holder extends WPBakeryShortCodesContainer {}
class WPBakeryShortCode_Edgtf_Team_Slider_Item extends WPBakeryShortCodesContainer {}
}
if ( class_exists( 'WPBakeryShortCode' ) ) {
class WPBakeryShortCode_Edgtf_Pricing_Table extends WPBakeryShortCode {}
class WPBakeryShortCode_Edgtf_Client extends WPBakeryShortCode {}
}
/*** Row ***/
if ( ! function_exists('edgtf_quadric_vc_row_map') ) {
/**
* Map VC Row shortcode
* Hooks on vc_after_init action
*/
function edgtf_quadric_vc_row_map()
{
$animations = array(
esc_html__( 'No animation', 'quadric' ) => '',
esc_html__( 'Elements Shows From Left Side', 'quadric' ) => 'edgtf-element-from-left',
esc_html__( 'Elements Shows From Right Side', 'quadric' ) => 'edgtf-element-from-right',
esc_html__( 'Elements Shows From Top Side', 'quadric' ) => 'edgtf-element-from-top',
esc_html__( 'Elements Shows From Bottom Side', 'quadric' ) => 'edgtf-element-from-bottom',
esc_html__( 'Elements Shows From Fade', 'quadric' ) => 'edgtf-element-from-fade'
);
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Row Type', 'quadric' ),
'param_name' => 'row_type',
'value' => array(
esc_html__( 'Row', 'quadric' ) => 'row',
esc_html__( 'Parallax', 'quadric' ) => 'parallax'
)
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Content Width', 'quadric' ),
'param_name' => 'content_width',
'value' => array(
esc_html__( 'Full Width', 'quadric' ) => 'full-width',
esc_html__( 'In Grid', 'quadric' ) => 'grid'
)
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Header Style', 'quadric' ),
'param_name' => 'header_style',
'value' => array(
esc_html__( 'Default', 'quadric' ) => '',
esc_html__( 'Light', 'quadric' ) => 'edgtf-light-header',
esc_html__( 'Dark', 'quadric' ) => 'edgtf-dark-header'
),
'dependency' => Array('element' => 'row_type', 'value' => array('row', 'parallax'))
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Anchor ID', 'quadric' ),
'param_name' => 'anchor',
'value' => '',
'description' => esc_html__( 'For example "home"', 'quadric' )
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Content Aligment', 'quadric' ),
'param_name' => 'content_aligment',
'value' => array(
esc_html__( 'Left', 'quadric' ) => 'left',
esc_html__( 'Center', 'quadric' ) => 'center',
esc_html__( 'Right', 'quadric' ) => 'right'
)
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Video Background', 'quadric' ),
'value' => array(
esc_html__( 'No', 'quadric' ) => '',
esc_html__( 'Yes', 'quadric' ) => 'show_video'
),
'param_name' => 'video',
'description' => '',
'dependency' => Array('element' => 'row_type', 'value' => array('row'))
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Video Overlay', 'quadric' ),
'value' => array(
esc_html__( 'No', 'quadric' ) => '',
esc_html__( 'Yes', 'quadric' ) => 'show_video_overlay'
),
'param_name' => 'video_overlay',
'description' => '',
'dependency' => Array('element' => 'video', 'value' => array('show_video'))
));
vc_add_param('vc_row', array(
'type' => 'attach_image',
'class' => '',
'heading' => esc_html__( 'Video Overlay Image (pattern)', 'quadric' ),
'value' => '',
'param_name' => 'video_overlay_image',
'description' => '',
'dependency' => Array('element' => 'video_overlay', 'value' => array('show_video_overlay'))
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Video Background (webm) File URL', 'quadric' ),
'value' => '',
'param_name' => 'video_webm',
'description' => '',
'dependency' => Array('element' => 'video', 'value' => array('show_video'))
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Video Background (mp4) file URL', 'quadric' ),
'value' => '',
'param_name' => 'video_mp4',
'description' => '',
'dependency' => Array('element' => 'video', 'value' => array('show_video'))
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Video Background (ogv) file URL', 'quadric' ),
'value' => '',
'param_name' => 'video_ogv',
'description' => '',
'dependency' => Array('element' => 'video', 'value' => array('show_video'))
));
vc_add_param('vc_row', array(
'type' => 'attach_image',
'class' => '',
'heading' => esc_html__( 'Video Preview Image', 'quadric' ),
'value' => '',
'param_name' => 'video_image',
'description' => '',
'dependency' => Array('element' => 'video', 'value' => array('show_video'))
));
vc_add_param("vc_row", array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Full Screen Height', 'quadric' ),
'param_name' => 'full_screen_section_height',
'value' => array(
esc_html__( 'No', 'quadric' ) => 'no',
esc_html__( 'Yes', 'quadric' ) => 'yes'
),
'save_always' => true,
'dependency' => Array('element' => 'row_type', 'value' => array('parallax'))
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Vertically Align Content In Middle', 'quadric' ),
'param_name' => 'vertically_align_content_in_middle',
'value' => array(
esc_html__( 'No', 'quadric' ) => 'no',
esc_html__( 'Yes', 'quadric' ) => 'yes'
),
'dependency' => array('element' => 'full_screen_section_height', 'value' => 'yes')
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Section Height', 'quadric' ),
'param_name' => 'section_height',
'value' => '',
'dependency' => Array('element' => 'full_screen_section_height', 'value' => array('no'))
));
vc_add_param('vc_row', array(
'type' => 'attach_image',
'class' => '',
'heading' => esc_html__( 'Parallax Background image', 'quadric' ),
'value' => '',
'param_name' => 'parallax_background_image',
'description' => esc_html__( 'Please note that for parallax row type, background image from Design Options will not work so you should fill this field', 'quadric' ),
'dependency' => Array('element' => 'row_type', 'value' => array('parallax'))
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Parallax speed', 'quadric' ),
'param_name' => 'parallax_speed',
'value' => '',
'dependency' => Array('element' => 'row_type', 'value' => array('parallax'))
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Floating Background', 'quadric' ),
'param_name' => 'floating_background',
'value' => array(
esc_html__( 'No', 'quadric' ) => 'no',
esc_html__( 'Yes', 'quadric' ) => 'yes'
),
'dependency' => array('element' => 'row_type', 'value' => 'row')
));
vc_add_param('vc_row', array(
'type' => 'attach_image',
'class' => '',
'heading' => esc_html__( 'Floating Background Image', 'quadric' ),
'param_name' => 'floating_image',
'value' => '',
'description' => esc_html__( 'For better effect, choose a smaller image, as its multiple instances will float around.', 'quadric' ),
'dependency' => Array('element' => 'floating_background', 'value' => array('yes'))
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'heading' => esc_html__( 'Direction of Floating', 'quadric' ),
'param_name' => 'floating_direction',
'value' => array(
esc_html__( 'Top -> Bottom', 'quadric' ) => 'top-bottom',
esc_html__( 'Bottom -> Top', 'quadric' ) => 'bottom-top',
esc_html__( 'Left -> Right', 'quadric' ) => 'left-right',
esc_html__( 'Right -> Left', 'quadric' ) => 'right-left',
esc_html__( 'Top Left -> Bottom Right', 'quadric' ) => 'top-left-bottom-right',
esc_html__( 'Top Right -> Bottom Left', 'quadric' ) => 'top-right-bottom-left',
esc_html__( 'Bottom Left -> Top Right', 'quadric' ) => 'bottom-left-top-right',
esc_html__( 'Bottom Right -> Top Left', 'quadric' ) => 'bottom-right-top-left',
),
'save_always' => true,
'dependency' => Array('element' => 'floating_image', 'not_empty' => true)
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'heading' => esc_html__( 'Speed of Floating', 'quadric' ),
'param_name' => 'floating_speed',
'value' => '3',
'description' => esc_html__( 'How many pixels per second floating images move.', 'quadric' ),
'dependency' => Array('element' => 'floating_image', 'not_empty' => true)
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'heading' => esc_html__( 'Zig-Zag Floating', 'quadric' ),
'param_name' => 'floating_zigzag',
'value' => array(
esc_html__( 'Yes', 'quadric' ) => 'yes',
esc_html__( 'No', 'quadric' ) => 'no',
),
'description' => esc_html__( '\'Yes\' will cause half of the images to float in opposite direction.', 'quadric' ),
'dependency' => Array('element' => 'floating_image', 'not_empty' => true)
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'heading' => esc_html__( 'Random Sized Floating Images', 'quadric' ),
'param_name' => 'floating_randsize',
'value' => array(
esc_html__( 'Yes', 'quadric' ) => 'yes',
esc_html__( 'No', 'quadric' ) => 'no',
),
'save_always' => true,
'description' => esc_html__( '\'Yes\' renders the floating image in random sizes.', 'quadric' ),
'dependency' => Array('element' => 'floating_image', 'not_empty' => true)
));
vc_add_param('vc_row', array(
'type' => 'dropdown',
'heading' => esc_html__( 'CSS Animation', 'quadric' ),
'param_name' => 'css_animation',
'value' => $animations,
'description' => '',
'dependency' => Array('element' => 'row_type', 'value' => array('row'))
));
vc_add_param('vc_row', array(
'type' => 'textfield',
'heading' => esc_html__( 'Transition delay (ms)', 'quadric' ),
'param_name' => 'transition_delay',
'admin_label' => true,
'value' => '',
'description' => '',
'dependency' => array('element' => 'css_animation', 'not_empty' => true)
));
/*** Row Inner ***/
vc_add_param('vc_row_inner', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Row Type', 'quadric' ),
'param_name' => 'row_type',
'value' => array(
esc_html__( 'Row', 'quadric' ) => 'row',
esc_html__( 'Parallax', 'quadric' ) => 'parallax'
)
));
vc_add_param('vc_row_inner', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Content Width', 'quadric' ),
'param_name' => 'content_width',
'value' => array(
esc_html__( 'Full Width', 'quadric' ) => 'full-width',
esc_html__( 'In Grid', 'quadric' ) => 'grid'
)
));
vc_add_param("vc_row_inner", array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Full Screen Height', 'quadric' ),
'param_name' => 'full_screen_section_height',
'value' => array(
esc_html__( 'No', 'quadric' ) => 'no',
esc_html__( 'Yes', 'quadric' ) => 'yes'
),
'save_always' => true,
'dependency' => Array('element' => 'row_type', 'value' => array('parallax'))
));
vc_add_param('vc_row_inner', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Vertically Align Content In Middle', 'quadric' ),
'param_name' => 'vertically_align_content_in_middle',
'value' => array(
esc_html__( 'No', 'quadric' ) => 'no',
esc_html__( 'Yes', 'quadric' ) => 'yes'
),
'dependency' => array('element' => 'full_screen_section_height', 'value' => 'yes')
));
vc_add_param('vc_row_inner', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Section Height', 'quadric' ),
'param_name' => 'section_height',
'value' => '',
'dependency' => Array('element' => 'full_screen_section_height', 'value' => array('no'))
));
vc_add_param('vc_row_inner', array(
'type' => 'attach_image',
'class' => '',
'heading' => esc_html__( 'Parallax Background image', 'quadric' ),
'value' => '',
'param_name' => 'parallax_background_image',
'description' => esc_html__( 'Please note that for parallax row type, background image from Design Options will not work so you should to fill this field', 'quadric' ),
'dependency' => Array('element' => 'row_type', 'value' => array('parallax'))
));
vc_add_param('vc_row_inner', array(
'type' => 'textfield',
'class' => '',
'heading' => esc_html__( 'Parallax speed', 'quadric' ),
'param_name' => 'parallax_speed',
'value' => '',
'dependency' => Array('element' => 'row_type', 'value' => array('parallax'))
));
vc_add_param('vc_row_inner', array(
'type' => 'dropdown',
'class' => '',
'heading' => esc_html__( 'Content Aligment', 'quadric' ),
'param_name' => 'content_aligment',
'value' => array(
esc_html__( 'Left', 'quadric' ) => 'left',
esc_html__( 'Center', 'quadric' ) => 'center',
esc_html__( 'Right', 'quadric' ) => 'right'
)
));
vc_add_param('vc_row_inner', array(
'type' => 'dropdown',
'heading' => esc_html__( 'CSS Animation', 'quadric' ),
'param_name' => 'css_animation',
'admin_label' => true,
'value' => $animations,
'description' => '',
'dependency' => Array('element' => 'row_type', 'value' => array('row'))
));
vc_add_param('vc_row_inner', array(
'type' => 'textfield',
'heading' => esc_html__( 'Transition delay (ms)', 'quadric' ),
'param_name' => 'transition_delay',
'admin_label' => true,
'value' => '',
'description' => '',
'dependency' => Array('element' => 'row_type', 'value' => array('row'))
));
}
add_action('vc_after_init', 'edgtf_quadric_vc_row_map');
}