当前位置: 首页>>代码示例>>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;未经允许,请勿转载。