Exemple #1
0
function wf_vc_setup()
{
    // Declare Theme Integration
    vc_set_as_theme();
    // Templates Directory
    $dir = plugin_dir_path(dirname(__FILE__) . 'includes/vc/templates');
    vc_set_shortcodes_templates_dir($dir);
}
Exemple #2
0
 /**
  * Setup Visual Composer for theme.
  *
  * Also, this function could be defined in theme "core" plugin.
  */
 function appica_vc_before_init()
 {
     vc_disable_frontend();
     vc_set_as_theme(true);
     // Allow post by default
     vc_set_default_editor_post_types(array('page', 'post', 'appica_portfolio'));
     // Set path to directory where Visual Composer should look for template files for content elements.
     $dir = get_template_directory() . '/inc/vc_templates';
     vc_set_shortcodes_templates_dir($dir);
 }
Exemple #3
0
function edo_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    kt_enqueue_custom_script();
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    vc_add_shortcode_param('edo_number', 'edo_number_settings_field');
    vc_add_shortcode_param('edo_taxonomy', 'edo_taxonomy_settings_field', KUTETHEME_PLUGIN_URL . '/js_composer/js/chosen/chosen.jquery.min.js');
    vc_add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
}
Exemple #4
0
function set_nectar_theme_template_dir()
{
    if (defined('SALIENT_VC_ACTIVE')) {
        $child_dir = get_stylesheet_directory() . '/nectar/nectar-vc-addons/vc_templates';
        $parent_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates';
        vc_set_shortcodes_templates_dir($parent_dir);
    } else {
        $child_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates';
        $parent_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates';
        vc_set_shortcodes_templates_dir($parent_dir);
    }
}
Exemple #5
0
function nectar_set_vc_as_theme()
{
    vc_set_as_theme($disable_updater = true);
    if (defined('SALIENT_VC_ACTIVE')) {
        $child_dir = get_stylesheet_directory() . '/nectar/nectar-vc-addons/vc_templates';
        $parent_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates';
        vc_set_shortcodes_templates_dir($parent_dir);
        vc_set_shortcodes_templates_dir($child_dir);
    } else {
        $child_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates';
        $parent_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates';
        vc_set_shortcodes_templates_dir($parent_dir);
        vc_set_shortcodes_templates_dir($child_dir);
    }
    vc_disable_frontend();
}
Exemple #6
0
function mk_set_vc_as_theme()
{
    vc_set_as_theme($disable_updater = true);
    if (defined('MODIFIED_VC_ACTIVATED')) {
        $child_dir = get_stylesheet_directory() . '/shortcodes';
        $parent_dir = get_template_directory() . '/shortcodes';
        vc_set_shortcodes_parent_templates_dir($parent_dir);
        vc_set_shortcodes_templates_dir($child_dir);
    } else {
        $child_dir = get_template_directory() . '/shortcodes';
        $parent_dir = get_template_directory() . '/shortcodes';
        vc_set_shortcodes_templates_dir($parent_dir);
        vc_set_shortcodes_templates_dir($child_dir);
    }
    vc_disable_frontend();
}
 public static function execute()
 {
     if (!class_exists('Vc_Manager', false)) {
         return;
     }
     if (function_exists('vc_set_as_theme')) {
         vc_set_as_theme(true);
     }
     if (function_exists('vc_set_default_editor_post_types')) {
         vc_set_default_editor_post_types(apply_filters('presscore_mod_js_composer_default_editor_post_types', array('page', 'post')));
     }
     if (function_exists('vc_set_shortcodes_templates_dir')) {
         vc_set_shortcodes_templates_dir(PRESSCORE_THEME_DIR . '/inc/shortcodes/vc_templates');
     }
     require_once locate_template('/inc/shortcodes/vc-extensions.php');
     add_action('init', array(__CLASS__, 'load_bridge'), 20);
     add_action('admin_enqueue_scripts', array(__CLASS__, 'load_admin_static'), 20);
     add_action('admin_init', array(__CLASS__, 'remove_teaser_meta_box'), 7);
 }
 public function __construct($settings)
 {
     $this->settings = is_array($settings) ? array_merge($this->settings, $settings) : array();
     if (!function_exists('vc_set_shortcodes_templates_dir')) {
         return;
     }
     vc_set_shortcodes_templates_dir(COMPONENTS_DIR . DS . 'vc');
     foreach (WPKit::get_shortcodes() as $shortcode) {
         if ($shortcode->compose) {
             vc_map($shortcode->to_array());
         }
     }
     add_action('wp_enqueue_scripts', array($this, 'remove_vc_styles'), 99);
     add_filter('vc_shortcodes_css_class', array($this, 'custom_css_classes'), 10, 3);
     add_action('vc_after_init', array($this, 'add_vc_params'));
     spl_autoload_register(function ($className) {
         $file = vc_path_dir('SHORTCODES_DIR', strtolower(str_replace('_', '-', str_replace('WPBakeryShortCode_', '', $className))) . '.php');
         if (file_exists($file)) {
             require $file;
         }
     });
 }
function kt_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    kt_enqueue_custom_script();
    if (function_exists('vc_add_shortcode_param')) {
        vc_add_shortcode_param('kt_select_image', 'vc_kt_select_image_settings_field');
        vc_add_shortcode_param('kt_categories', 'vc_kt_categories_settings_field');
        vc_add_shortcode_param('kt_number', 'vc_ktnumber_settings_field');
        vc_add_shortcode_param('kt_taxonomy', 'vc_kt_taxonomy_settings_field');
        vc_add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
    } else {
        add_shortcode_param('kt_select_image', 'vc_kt_select_image_settings_field');
        add_shortcode_param('kt_categories', 'vc_kt_categories_settings_field');
        add_shortcode_param('kt_number', 'vc_ktnumber_settings_field');
        add_shortcode_param('kt_taxonomy', 'vc_kt_taxonomy_settings_field');
        add_shortcode_param('kt_datetimepicker', 'vc_kt_datetimepicker_settings_field');
    }
}
Exemple #10
0
		 * Visual Composer custom view scripts
		 * 
		 * @since 4.1.5
		 */
		function presscore_vc_inline_editor_scripts() {
			if ( ! function_exists('vc_is_inline') || ! vc_is_inline() ) {
				return;
			}

			wp_enqueue_script( 'vc-custom-view-by-dt', get_template_directory_uri() . '/inc/shortcodes/js/vc-custom-view.js', array(), false, true );
		}

	endif;

	if ( function_exists( 'vc_set_shortcodes_templates_dir' ) ) {
		vc_set_shortcodes_templates_dir( get_template_directory() . '/inc/shortcodes/vc_templates' );
	}
}


if ( !function_exists('dt_make_relative_image_path') ) :

	/**
	 * Make image path relative.
	 *
	 */
	function dt_make_relative_image_path( $content = '' ) {

		if ( !get_option( 'presscore_less_css_is_writable' ) ) {
			return $content;
		}
Exemple #11
0
    vc_set_as_theme();
}
/**
 * Initialising Visual Composer
 * 
 */
if (class_exists('Vc_Manager', false)) {
    if (!function_exists('kt_composer_bridge_admin')) {
        function kt_composer_bridge_admin($hook)
        {
            wp_enqueue_style('js_composer_bridge', KT_FW_CSS . 'js_composer_bridge.css', array(), KT_FW_VER);
        }
    }
    add_action('admin_enqueue_scripts', 'kt_composer_bridge_admin', 15);
    if (!function_exists('kt_js_composer_bridge')) {
        function kt_js_composer_bridge()
        {
            require KT_FW_DIR . 'js_composer/js_composer_parrams.php';
            require KT_FW_DIR . 'js_composer/js_composer_bridge.php';
        }
        if (function_exists('vc_set_shortcodes_templates_dir')) {
            vc_set_shortcodes_templates_dir(KT_THEME_TEMP . '/vc_templates');
        }
    }
    add_action('init', 'kt_js_composer_bridge', 20);
}
/**
 * Include Widgets register and define all sidebars.
 *
 */
require KT_FW_DIR . 'widgets.php';
Exemple #12
0
 function kreativa_SetAsTheme()
 {
     vc_set_as_theme();
     $dir = get_stylesheet_directory() . '/inc/vcaddons/elements';
     vc_set_shortcodes_templates_dir($dir);
 }
Exemple #13
0
<?php

/**
 * Initial setup
 * =============
 */
$new_vc_dir = get_template_directory() . '/inc/vc-template';
if (function_exists("vc_set_shortcodes_templates_dir")) {
    vc_set_shortcodes_templates_dir($new_vc_dir);
}
if (class_exists('WPBakeryShortCode')) {
    class WPBakeryShortCode_Thememove_Recentposts extends WPBakeryShortCode
    {
    }
    class WPBakeryShortCode_Thememove_Testi extends WPBakeryShortCode
    {
    }
    class WPBakeryShortCode_Thememove_Button extends WPBakeryShortCode
    {
    }
    class WPBakeryShortCode_Thememove_Blog extends WPBakeryShortCode
    {
    }
    class WPBakeryShortCode_Thememove_Gmaps extends WPBakeryShortCode
    {
        public function __construct($settings)
        {
            parent::__construct($settings);
            $this->jsScripts();
        }
        public function jsScripts()
Exemple #14
0
<?php

/**
 * Initialize Visual Composer
 */
if (class_exists('Vc_Manager', false)) {
    add_action('vc_before_init', 'trav_vcSetAsTheme');
    function trav_vcSetAsTheme()
    {
        vc_set_as_theme(true);
    }
    if (function_exists('vc_disable_frontend')) {
        vc_disable_frontend();
    }
    add_action('vc_before_init', 'trav_load_js_composer');
    function trav_load_js_composer()
    {
        require_once TRAV_INC_DIR . '/functions/js_composer/js_composer.php';
    }
    if (function_exists('vc_set_shortcodes_templates_dir')) {
        vc_set_shortcodes_templates_dir(TRAV_INC_DIR . '/functions/js_composer/vc_templates');
    }
}
Exemple #15
0
 */
if (class_exists('Vc_Manager', false)) {
    if (!function_exists('js_composer_bridge_admin')) {
        function js_composer_bridge_admin($hook)
        {
            wp_enqueue_style('js_composer_bridge', CRUXSTORE_FW_CSS . 'js_composer_bridge.css', array(), CRUXSTORE_FW_VER);
        }
    }
    add_action('admin_enqueue_scripts', 'js_composer_bridge_admin', 15);
    function cruxstore_js_composer_bridge()
    {
        require CRUXSTORE_FW_DIR . 'js_composer/js_composer_parrams.php';
        require CRUXSTORE_FW_DIR . 'js_composer/js_composer_bridge.php';
    }
    if (function_exists('vc_set_shortcodes_templates_dir')) {
        vc_set_shortcodes_templates_dir(CRUXSTORE_THEME_TEMP . '/vc_templates');
    }
    add_action('init', 'cruxstore_js_composer_bridge', 20);
    function rd_vc_remove_frontend_links()
    {
        vc_disable_frontend();
        // this will disable frontend editor
    }
    add_action('vc_after_init', 'rd_vc_remove_frontend_links');
    function cruxstore_vc_remove_cf7()
    {
        if (is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
            vc_remove_element('contact-form-7');
            // Add other elements that should be removed here
        }
    }
Exemple #16
0
<?php

if (function_exists('vc_set_as_theme')) {
    add_action('vc_before_init', function () {
        define('NEW_VC_TEMPLATE_DIR', dirname(__FILE__) . '/vc_templates/');
        /* Set Theme */
        vc_set_as_theme(true);
        /* Disable Front-End */
        // vc_disable_frontend();
        /* Set templates directory */
        vc_set_shortcodes_templates_dir(NEW_VC_TEMPLATE_DIR);
        /* Set Default Value */
        WPBakeryVisualComposerAbstract::$config['default_post_types'] = array('page', 'templates');
        /* Include map.php */
        include 'map.php';
        /* 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_widget_sidebar");
        // vc_remove_element("vc_accordion_tab");
Exemple #17
0
        vc_remove_element('product_category');
        vc_remove_element('product_categories');
        vc_remove_element('sale_products');
        vc_remove_element('best_selling_products');
        vc_remove_element('top_rated_products');
        vc_remove_element('product_attribute');
    }
}
add_action('vc_build_admin_page', 'rehub_vc_remove_woocommerce', 11);
add_action('vc_load_shortcode', 'rehub_vc_remove_woocommerce', 11);
//Disable frontend
vc_disable_frontend();
//Set default post types
vc_set_default_editor_post_types(array('page'));
$dir_for_vc = get_stylesheet_directory() . '/functions/vc_templates';
vc_set_shortcodes_templates_dir($dir_for_vc);
//WIDGET BLOCK
vc_remove_param("vc_widget_sidebar", "title");
//ROW BLOCK
add_action('vc_after_init_base', 'add_more_rehub_layouts');
function add_more_rehub_layouts()
{
    global $vc_row_layouts;
    array_push($vc_row_layouts, array('cells' => '34_14', 'mask' => '212', 'title' => '3/4 + 1/4', 'icon_class' => 'l_34_14'));
}
vc_remove_param("vc_row", "full_width");
vc_add_param("vc_row", array("type" => "dropdown", "class" => "", "heading" => __("Type of row width", "rehub_child"), "param_name" => "bg_width_type", "admin_label" => true, "value" => array(__('Inside content container', 'rehub_child') => "simple", __('Full width of content container', 'rehub_child') => "container_width", __('Full width of browser window', 'rehub_child') => "window_width")));
vc_add_param("vc_row", array("type" => "checkbox", "class" => "", "heading" => __("Container with sidebar?", "rehub_child"), "value" => array(__("Yes", "rehub_child") => "true"), "param_name" => "rehub_container", "dependency" => array("element" => "bg_width_type", "value" => array("simple")), "description" => __("Is this container with sidebar? Enable this option and use 2/3 + 1/3 layout for better compatibility if you want to add sidebar widget area.", "rehub_child")));
vc_add_param("vc_row", array("type" => "checkbox", "class" => "", "heading" => __("Make inner container center alignment?", "rehub_child"), "value" => array(__("Yes", "rehub_child") => "true"), "param_name" => "centered_container", "description" => __("This option is good for full width pages. It leaves background of row as full widht, but makes inner column centered in window with max-width 1170px.", "rehub_child")));
$setting_row = array('show_settings_on_create' => true);
vc_map_update('vc_row', $setting_row);
        register_widget('SH_Contact_Form');
    }
    register_sidebar(array('name' => esc_html__('Default Sidebar', SH_NAME), 'id' => 'default-sidebar', 'description' => esc_html__('Widgets in this area will be shown on the right-hand side.', SH_NAME), 'class' => '', 'before_widget' => '<div id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '</div>', 'before_title' => '<div class="widget-title clearfix"><h3>', 'after_title' => '</h3></div>'));
    register_sidebar(array('name' => esc_html__('Footer Sidebar', SH_NAME), 'id' => 'footer-sidebar', 'description' => esc_html__('Widgets in this area will be shown on the footer.', SH_NAME), 'class' => '', 'before_widget' => '<div id="%1$s" class="clearfix %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    if (!is_object(_WSH())) {
        return;
    }
    $sidebars = sh_set(sh_set($theme_options, 'dynamic_sidebar'), 'dynamic_sidebar');
    foreach (array_filter((array) $sidebars) as $sidebar) {
        if (sh_set($sidebar, 'topcopy')) {
            continue;
        }
        $name = sh_set($sidebar, 'sidebar_name');
        if (!$name) {
            continue;
        }
        $slug = sh_slug($name);
        register_sidebar(array('name' => $name, 'id' => $slug, 'before_widget' => '<div class="widget">', 'after_widget' => "</div>", 'before_title' => '<div class="widget-title"><h3><span class="divider"></span>', 'after_title' => '</h3></div>'));
    }
    update_option('wp_registered_sidebars', $wp_registered_sidebars);
}
add_action('widgets_init', 'sh_widget_init');
if (function_exists('vc_map')) {
    vc_set_shortcodes_templates_dir(get_template_directory() . '/includes/modules/shortcodes');
    vc_disable_frontend();
    add_action('vc_before_init', '_sh_prefix_vcSetAsTheme');
    function _sh_prefix_vcSetAsTheme()
    {
        vc_set_as_theme();
    }
}
Exemple #19
0
 /**
  * Sets directory where Visual Composer should look for template files for content elements.
  * @since 4.2
  * @deprecated 4.2
  *
  * @param string - full directory path to new template directory with trailing slash
  */
 function vc_set_template_dir($dir)
 {
     // _deprecated_function( 'vc_set_template_dir', '4.2 (will be removed in 4.10)', 'vc_set_shortcodes_templates_dir' );
     vc_set_shortcodes_templates_dir($dir);
 }
Exemple #20
0
function candy_vc_intialization()
{
    vc_set_as_theme(true);
    require get_template_directory() . '/agni/composer/agni_vc_addons.php';
    vc_set_shortcodes_templates_dir(get_template_directory() . '/agni/composer/vc_templates/');
    add_filter('vc_load_default_templates', 'my_custom_template_modify_array');
    function my_custom_template_modify_array($data)
    {
        return array();
        // This will remove all default templates
    }
}
 /**
  * Sets directory where Visual Composer should look for template files for content elements.
  * @since 4.2
  * @deprecated 4.2
  *
  * @param string - full directory path to new template directory with trailing slash
  */
 function vc_set_template_dir($dir)
 {
     _deprecated_function('vc_set_template_dir', '4.2', 'vc_set_shortcodes_templates_dir');
     vc_set_shortcodes_templates_dir($dir);
 }
{
    return array('post', 'page', 'wt_portfolio');
    //will display DFI in post and page
}
/*------------------------------------------------*/
/*	- Visual Composer Tweaks
/*------------------------------------------------*/
if (class_exists('WPBakeryVisualComposerAbstract')) {
    // Set Visual Composer to run in Theme Mode - Remove Visual Composer notifier
    if (function_exists('vc_set_as_theme')) {
        vc_set_as_theme(true);
    }
    // Override directory where Visual Composer should look for template files for content elements
    if (function_exists('vc_set_shortcodes_templates_dir')) {
        $templates_dir = THEME_FUNCTIONS . '/visual-composer/wt_vcsc_templates/';
        vc_set_shortcodes_templates_dir($templates_dir);
    }
    // Remove certain default VC modules
    require_once THEME_FUNCTIONS . '/visual-composer/remove.php';
    // Make js composer stylesheet to load in onepage themes.
    add_action('wp_enqueue_scripts', 'force_js_composer_front_load');
    function force_js_composer_front_load()
    {
        wp_enqueue_style('js_composer_front');
    }
}
/*------------------------------------------------*/
/*	- TGM Plugins Activation
/*------------------------------------------------*/
add_action('tgmpa_register', 'wt_register_required_plugins');
function wt_register_required_plugins()
Exemple #23
0
 /**
  * Sets directory where Visual Composer should look for template files for content elements.
  * @since 4.2
  * @deprecated 4.2
  *
  * @param string - full directory path to new template directory with trailing slash
  */
 function vc_set_template_dir($dir)
 {
     vc_set_shortcodes_templates_dir($dir);
 }
require_once 'stm_elements/coming_events.php';
require_once 'stm_elements/causes.php';
require_once 'stm_elements/volunteers.php';
require_once 'stm_elements/volunteer_join_us_button.php';
require_once 'stm_elements/blog_list.php';
require_once 'stm_elements/testimonials.php';
require_once 'stm_elements/gallery.php';
require_once 'stm_elements/info_box.php';
require_once 'stm_elements/google_map.php';
add_action('vc_before_init', 'stm_vcSetAsTheme');
function stm_vcSetAsTheme()
{
    vc_set_as_theme(true);
}
if (function_exists('vc_set_shortcodes_templates_dir')) {
    vc_set_shortcodes_templates_dir(get_template_directory() . '/inc/visual_composer/vc_templates');
}
if (function_exists('vc_set_default_editor_post_types')) {
    vc_set_default_editor_post_types(array('page', 'post', 'event', 'donation'));
}
if (is_admin()) {
    if (!function_exists('stm_vc_remove_teaser_metabox')) {
        function stm_vc_remove_teaser_metabox()
        {
            $post_types = get_post_types('', 'names');
            foreach ($post_types as $post_type) {
                remove_meta_box('vc_teaser', $post_type, 'side');
            }
        }
        add_action('do_meta_boxes', 'stm_vc_remove_teaser_metabox');
    }
/**
 * Visual Composer setup.
 */
// File Security Check
if (!defined('ABSPATH')) {
    exit;
}
if (function_exists('vc_set_as_theme')) {
    vc_set_as_theme(true);
}
if (function_exists('vc_set_default_editor_post_types')) {
    vc_set_default_editor_post_types(array('page', 'post', 'dt_portfolio', 'dt_benefits'));
}
if (function_exists('vc_set_shortcodes_templates_dir')) {
    vc_set_shortcodes_templates_dir(PRESSCORE_THEME_DIR . '/inc/shortcodes/vc_templates');
}
require_once locate_template('/inc/shortcodes/vc-extensions.php');
if (!function_exists('presscore_js_composer_load_bridge')) {
    /**
     * Visual composer theme shortcodes map
     *
     * @since 1.0.0
     */
    function presscore_js_composer_load_bridge()
    {
        $shortcodes_to_remove = apply_filters('presscore_js_composer_shortcodes_to_remove', array("vc_wp_search", "vc_wp_meta", "vc_wp_recentcomments", "vc_wp_calendar", "vc_wp_pages", "vc_wp_tagcloud", "vc_wp_custommenu", "vc_wp_text", "vc_wp_posts", "vc_wp_links", "vc_wp_categories", "vc_wp_archives", "vc_wp_rss", "vc_gallery", "vc_teaser_grid", "vc_button", "vc_cta_button", "vc_posts_grid", "vc_carousel", "vc_images_carousel", "vc_posts_slider", "vc_cta_button2", "vc_pie"));
        foreach ($shortcodes_to_remove as $shortcode) {
            vc_remove_element($shortcode);
        }
        require_once locate_template('/inc/shortcodes/js_composer_bridge.php');
Exemple #26
0
<?php

/**
 * Initialize Visual Composer
 */
if (class_exists('Vc_Manager', false)) {
    add_action('vc_before_init', 'ct_vcSetAsTheme');
    function ct_vcSetAsTheme()
    {
        vc_set_as_theme(true);
    }
    if (function_exists('vc_disable_frontend')) {
        vc_disable_frontend();
    }
    add_action('vc_before_init', 'ct_load_js_composer');
    function ct_load_js_composer()
    {
        require_once CT_INC_DIR . '/js_composer/js_composer.php';
    }
    if (function_exists('vc_set_shortcodes_templates_dir')) {
        vc_set_shortcodes_templates_dir(CT_INC_DIR . '/js_composer/vc_templates');
    }
}
Exemple #27
0
}
add_action('vc_before_init', 'om_vc_set_as_theme');
/******************************************/
if (om_wpb_activated() && get_option(OM_THEME_PREFIX . 'disable_wpb_addons') != 'true') {
    function om_wpb_remove_grid()
    {
        if (defined('VC_PAGE_MAIN_SLUG') && class_exists('Vc_Grid_Item_Editor')) {
            remove_submenu_page(VC_PAGE_MAIN_SLUG, 'edit.php?post_type=' . rawurlencode(Vc_Grid_Item_Editor::postType()));
            global $wp_post_types;
            if (isset($wp_post_types['vc_grid_item'])) {
                unset($wp_post_types['vc_grid_item']);
            }
        }
    }
    add_action('vc_menu_page_build', 'om_wpb_remove_grid', 20);
    vc_set_shortcodes_templates_dir(TEMPLATE_DIR . '/wpb/vc_templates/');
    require_once TEMPLATE_DIR . '/wpb/functions/attribute-types.php';
    require_once TEMPLATE_DIR . '/wpb/functions/options.php';
    require_once TEMPLATE_DIR . '/wpb/functions/misc.php';
    require_once TEMPLATE_DIR . '/wpb/functions/custom_shortcodes.php';
    require_once TEMPLATE_DIR . '/wpb/functions/modifications.php';
    // Testimonials
    if (isset($GLOBALS['omTestimonialsPlugin'])) {
        include_once TEMPLATE_DIR . '/widgets/testimonials/testimonials.php';
    }
    /**
     * Styles & Scripts
     */
    function om_wpb_admin_scripts()
    {
        if (in_array(get_post_type(), vc_editor_post_types())) {
Exemple #28
0
 /**
  * Registe view template path
  *
  * @param string $path full path to short code view templates dir
  *
  * @access public
  * @static
  */
 public function setViewPath($path)
 {
     vc_set_shortcodes_templates_dir($path);
 }
Exemple #29
0
 public function vc_before_init()
 {
     //Disable automatic updates notifications
     vc_set_as_theme(true);
     // Set default shortcodes templates
     vc_set_shortcodes_templates_dir(get_template_directory() . '/shortcodes/templates');
 }
Exemple #30
-1
function kt_add_vc_global_params()
{
    vc_set_shortcodes_templates_dir(THEME_DIR . '/js_composer/templates/');
    global $vc_setting_row, $vc_setting_col, $vc_setting_column_inner, $vc_setting_icon_shortcode;
    vc_add_params('vc_icon', $vc_setting_icon_shortcode);
    vc_add_params('vc_column', $vc_setting_col);
    vc_add_params('vc_column_inner', $vc_setting_column_inner);
    add_shortcode_param('kt_select_image', 'vc_kt_select_image_settings_field');
    add_shortcode_param('kt_categories', 'vc_kt_categories_settings_field');
    add_shortcode_param('kt_number', 'vc_ktnumber_settings_field');
    add_shortcode_param('kt_taxonomy', 'vc_kt_taxonomy_settings_field', KUTETHEME_PLUGIN_URL . '/js_composer/js/chosen/chosen.jquery.min.js');
}