/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot
/
inc
/
vc
/
Upload File
HOME
<?php /** * Includes the most important hooks/filters for the Visual Composer. * * @package Aisconverse * @subpackage Covercase * @since Covercase 1.0 */ if ( ! function_exists( 'covercase_vc_tta' ) ) { /** * Detect tour/tabs * * @since Covercase 1.0 */ function covercase_vc_tta( $html, $atts, $content, $tta ) { $class = ! empty( $tta ) ? get_class( $tta ) : ''; if ( ! empty( $class ) ) { switch ( $class ) { case 'WPBakeryShortCode_VC_Tta_Tour' : $class = 'vc_tta_type_tour'; break; case 'WPBakeryShortCode_VC_Tta_Tabs' : $class = 'vc_tta_type_tabs'; break; } $html = str_replace( '<div class="vc_tta-tabs-container">', "<div class=\"vc_tta-tabs-container {$class}\">", $html ); } return $html; } add_filter( 'vc-tta-get-params-tabs-list', 'covercase_vc_tta', 10, 4 ); } if ( ! function_exists( 'covercase_allowed_tags' ) ) { /** * All allowed tags for custom heading * * @since Covercase 1.0 */ function covercase_allowed_tags( $allowed_tags ) { return array( 'h1', 'h1.1', 'h1.2', 'h2', 'h2.1', 'h3', 'h4', 'h4.1', 'h5', 'h6', 'h6.1', 'h6.2', 'p.extra', 'p.lead', 'p.middle', 'p', 'div', ); } add_filter( 'vc_font_container_get_allowed_tags', 'covercase_allowed_tags' ); } if ( ! function_exists( 'covercase_vc_init' ) ) { /** * VC first init function * * @since Covercase 1.0 */ function covercase_vc_init() { // Change template folder if ( function_exists( 'vc_set_shortcodes_templates_dir' ) && apply_filters( 'covercase_vc_new_templates_folder', true ) ) { vc_set_shortcodes_templates_dir( get_theme_file_path( 'inc/vc/templates' ) ); } // Enable Page Builder for theme defined post types by default if ( function_exists( 'vc_set_default_editor_post_types' ) && apply_filters( 'covercase_vc_posts_editor', true ) ) { vc_set_default_editor_post_types( array( 'page', 'post', 'single_project', 'carousel_slide', 'product', 'modals' ) ); } } add_action( 'init', 'covercase_vc_init' ); } if ( ! function_exists( 'covercase_vc_before_init' ) ) { /** * VC before init function * * @since Covercase 1.0 */ function covercase_vc_before_init() { // Setup VC to be part of a theme if ( function_exists( 'vc_set_as_theme' ) ) { vc_set_as_theme(); } // Disable Instructional/Help Pointers if ( function_exists( 'vc_pointer_load' ) ) { remove_action( 'admin_enqueue_scripts', 'vc_pointer_load' ); } } add_action( 'vc_before_init', 'covercase_vc_before_init' ); } if ( ! function_exists( 'covercase_vc_less_compiler' ) ) { /** * VC variables for LESS compiler * * @since Covercase 1.0 */ function covercase_vc_less_compiler( $variables ) { $variables['screen-lg'] = array( 'key' => 'wpb_js_responsive_screen_lg', 'default' => '1260', 'modify_output' => array( array( 'plain' => array( '1260px', ), ), ), ); return $variables; } add_filter( 'vc_settings-less-variables', 'covercase_vc_less_compiler' ); } if ( ! function_exists( 'covercase_vc_remove_elements' ) ) { /** * Removes VC elements * * @since Covercase 1.0 */ function covercase_vc_remove_elements() { // Remove WooCommerce elements if ( function_exists( 'vc_remove_element' ) && apply_filters( 'covercase_vc_woo_remove_elements', true ) ) { vc_remove_element( 'woocommerce_cart' ); vc_remove_element( 'woocommerce_checkout' ); vc_remove_element( 'woocommerce_order_tracking' ); vc_remove_element( 'woocommerce_my_account' ); vc_remove_element( 'recent_products' ); vc_remove_element( 'featured_products' ); vc_remove_element( 'product' ); vc_remove_element( 'products' ); vc_remove_element( 'add_to_cart' ); vc_remove_element( 'add_to_cart_url' ); vc_remove_element( 'product_page' ); vc_remove_element( 'product_category' ); vc_remove_element( 'sale_products' ); vc_remove_element( 'best_selling_products' ); vc_remove_element( 'top_rated_products' ); } // Remove elements if ( function_exists( 'vc_remove_element' ) && apply_filters( 'covercase_vc_vc_remove_elements', true ) ) { vc_remove_element( 'vc_wp_search' ); vc_remove_element( 'vc_wp_meta' ); vc_remove_element( 'vc_wp_recentcomments' ); vc_remove_element( 'vc_wp_custommenu' ); vc_remove_element( 'vc_wp_text' ); vc_remove_element( 'vc_wp_posts' ); vc_remove_element( 'vc_wp_pages' ); vc_remove_element( 'vc_wp_categories' ); vc_remove_element( 'vc_wp_archives' ); vc_remove_element( 'vc_widget_sidebar' ); vc_remove_element( 'vc_wp_calendar' ); vc_remove_element( 'vc_wp_rss' ); vc_remove_element( 'vc_wp_tagcloud' ); vc_remove_element( 'vc_cta' ); vc_remove_element( 'vc_flickr' ); vc_remove_element( 'vc_round_chart' ); vc_remove_element( 'vc_line_chart' ); 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( 'product_categories' ); vc_remove_element( 'product_attribute' ); vc_remove_element( 'vc_gallery' ); vc_remove_element( 'vc_images_carousel' ); vc_remove_element( 'vc_posts_slider' ); vc_remove_element( 'vc_tta_pageable' ); vc_remove_element( 'vc_pie' ); vc_remove_element( 'vc_zigzag' ); vc_remove_element( 'vc_hoverbox' ); vc_remove_element( 'rev_slider' ); vc_remove_element( 'rev_slider_vc' ); } } // Hook for admin editor. add_action( 'vc_build_admin_page', 'covercase_vc_remove_elements', 11 ); // Hook for frontend editor. add_action( 'vc_load_shortcode', 'covercase_vc_remove_elements', 11 ); }