當前位置: 首頁>>代碼示例>>PHP>>正文


PHP vc_set_shortcodes_templates_dir函數代碼示例

本文整理匯總了PHP中vc_set_shortcodes_templates_dir函數的典型用法代碼示例。如果您正苦於以下問題:PHP vc_set_shortcodes_templates_dir函數的具體用法?PHP vc_set_shortcodes_templates_dir怎麽用?PHP vc_set_shortcodes_templates_dir使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了vc_set_shortcodes_templates_dir函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wf_vc_setup

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);
}
開發者ID:prosatya,項目名稱:WF-Gmap,代碼行數:8,代碼來源:vc-config.php

示例2: appica_vc_before_init

 /**
  * 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);
 }
開發者ID:narendra-addweb,項目名稱:m1,代碼行數:15,代碼來源:vc.php

示例3: edo_add_vc_global_params

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');
}
開發者ID:ngocthangict,項目名稱:edo,代碼行數:12,代碼來源:custom-fields.php

示例4: set_nectar_theme_template_dir

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);
    }
}
開發者ID:ryuqing,項目名稱:cake,代碼行數:12,代碼來源:functions.php

示例5: nectar_set_vc_as_theme

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();
}
開發者ID:ryuqing,項目名稱:cake,代碼行數:16,代碼來源:nectar-addons.php

示例6: mk_set_vc_as_theme

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();
}
開發者ID:namleduc,項目名稱:thqc,代碼行數:16,代碼來源:vc-integration.php

示例7: execute

 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);
 }
開發者ID:10asfar,項目名稱:WordPress-the7-theme-demo-,代碼行數:19,代碼來源:class-compatibility-vc.php

示例8: __construct

 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;
         }
     });
 }
開發者ID:darbymanning,項目名稱:Family-Church,代碼行數:22,代碼來源:JsComposer.php

示例9: kt_add_vc_global_params

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');
    }
}
開發者ID:acamboy,項目名稱:kutetheme-wp,代碼行數:22,代碼來源:custom-fields.php

示例10: presscore_vc_inline_editor_scripts

		 * 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;
		}
開發者ID:GitIPFire,項目名稱:Homeworks,代碼行數:31,代碼來源:functions.php

示例11: vc_set_as_theme

    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';
開發者ID:websideas,項目名稱:aquila,代碼行數:31,代碼來源:core.php

示例12: kreativa_SetAsTheme

 function kreativa_SetAsTheme()
 {
     vc_set_as_theme();
     $dir = get_stylesheet_directory() . '/inc/vcaddons/elements';
     vc_set_shortcodes_templates_dir($dir);
 }
開發者ID:rafinkarki,項目名稱:My_Themes,代碼行數:6,代碼來源:vc-config.php

示例13: get_template_directory

<?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()
開發者ID:Neminath,項目名稱:lastmile,代碼行數:31,代碼來源:vc-extend.php

示例14: add_action

<?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');
    }
}
開發者ID:BersnardC,項目名稱:DROPINN,代碼行數:23,代碼來源:init.php

示例15: js_composer_bridge_admin

 */
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
        }
    }
開發者ID:websideas,項目名稱:Mondova,代碼行數:31,代碼來源:core.php


注:本文中的vc_set_shortcodes_templates_dir函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。