本文整理汇总了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函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: add_action
<?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");
开发者ID:Sean12mps,项目名称:titan-cfx,代码行数:31,代码来源:extend-vc.php
示例17: vc_remove_element
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);
开发者ID:rhondamoananui,项目名称:rehub,代码行数:31,代码来源:vc_functions.php
示例18: register_widget
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();
}
}
开发者ID:estrategasdigitales,项目名称:kanet,代码行数:31,代码来源:functions.php
示例19: vc_set_template_dir
/**
* 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);
}
开发者ID:k2jysy,项目名称:wedev,代码行数:12,代码来源:helpers_api.php
示例20: candy_vc_intialization
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
}
}
开发者ID:Calraiser,项目名称:portfolio,代码行数:12,代码来源:functions.php
注:本文中的vc_set_shortcodes_templates_dir函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论