<?php

include_once(ABSPATH . 'wp-admin/includes/plugin.php');
if (!is_plugin_active('js_composer/js_composer.php')) {
    return;
}

if( function_exists('vc_set_as_theme') ){
	add_action('vc_before_init', 'cstheme_vcSetAsTheme');
	function cstheme_vcSetAsTheme()
	{
		vc_set_as_theme($disable_updater = true);
	}
}

$cstheme_vc_templates_dir = get_stylesheet_directory() . '/inc/vc/shortcodes';
vc_set_shortcodes_templates_dir($cstheme_vc_templates_dir);

require_once locate_template( '/inc/vc/custom_params.php' );
require_once locate_template( '/inc/vc/js_composer_bridge.php' );