本文整理汇总了PHP中vc_path_dir函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_path_dir函数的具体用法?PHP vc_path_dir怎么用?PHP vc_path_dir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_path_dir函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vc_grid_item_vc_settings_exclude
/**
* Adds grid item post type into the list of excluded post types for VC editors.
*
* @param array $list
*
* @since 4.4
* @deprecated
* @return array
*/
function vc_grid_item_vc_settings_exclude(array $list)
{
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/editor/class-vc-grid-item-editor.php');
$vc_grid_item_editor = new Vc_Grid_Item_Editor();
$list[] = $vc_grid_item_editor->postType();
return $list;
}
示例2: mapGridItemShortcodes
public function mapGridItemShortcodes(array $shortcodes)
{
require_once vc_path_dir('VENDORS_DIR', 'plugins/acf/class-vc-gitem-acf-shortcode.php');
require_once vc_path_dir('VENDORS_DIR', 'plugins/acf/grid-item-attributes.php');
$wc_shortcodes = (include vc_path_dir('VENDORS_DIR', 'plugins/acf/grid-item-shortcodes.php'));
return $shortcodes + $wc_shortcodes;
}
示例3: getLoop
protected function getLoop($loop)
{
global $vc_posts_grid_exclude_id;
$vc_posts_grid_exclude_id[] = get_the_ID();
require_once vc_path_dir('PARAMS_DIR', 'loop/loop.php');
list($this->loop_args, $this->query) = vc_build_loop_query($loop, $vc_posts_grid_exclude_id);
}
示例4: vc_include_settings_preset_class
/**
* Include settings preset class
*
* Also check if user has 'edit_posts' capability and if not, respond with unsuccessful status
*
* @since 4.8
*/
function vc_include_settings_preset_class()
{
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
wp_send_json(array('success' => false));
}
require_once vc_path_dir('AUTOLOAD_DIR', 'class-vc-settings-presets.php');
}
示例5: vc_init_vendor_jwplayer
function vc_init_vendor_jwplayer()
{
if (is_plugin_active('jw-player-plugin-for-wordpress/jwplayermodule.php') || defined('JWP6') || class_exists('JWP6_Plugin')) {
require_once vc_path_dir('VENDORS_DIR', 'plugins/class-vc-vendor-jwplayer.php');
$vendor = new Vc_Vendor_Jwplayer();
$vendor->load();
}
}
示例6: getLayout
/**
* Getter for WPBakeryVisualComposerLayout.
*
* @see WPBakeryVisualComposerLayout
* @since 4.2
* @access public
* @return WPBakeryVisualComposerLayout
*/
public function getLayout()
{
require_once vc_path_dir('TEMPLATES_DIR', 'backend_editor/layouts.php');
if ($this->layout === null) {
$this->layout = new WPBakeryVisualComposerLayout();
}
return $this->layout;
}
示例7: vc_init_vendor_wpml
function vc_init_vendor_wpml()
{
if (defined('ICL_SITEPRESS_VERSION')) {
require_once vc_path_dir('VENDORS_DIR', 'plugins/class-vc-vendor-wpml.php');
$vendor = new Vc_Vendor_WPML();
add_action('vc_after_set_mode', array($vendor, 'load'));
}
}
示例8: init
/**
* Include params list objects and calls all stored activity methods.
*
* @since 4.2
* @access public
*/
public function init() {
do_action('vc_mapper_init_before');
require_once vc_path_dir( 'PARAMS_DIR', 'load.php' );
WPBMap::setInit();
require_once vc_path_dir( 'CONFIG_DIR', 'map.php' );
$this->callActivities();
do_action('vc_mapper_init_after');
}
示例9: vc_init_vendor_qtranslatex
function vc_init_vendor_qtranslatex()
{
if (defined('QTX_VERSION')) {
require_once vc_path_dir('VENDORS_DIR', 'plugins/class-vc-vendor-qtranslate-x.php');
$vendor = new Vc_Vendor_QtranslateX();
add_action('vc_after_set_mode', array($vendor, 'load'));
}
}
示例10: renderFields
/**
* Build edit form fields.
*
* @since 4.4
*/
public function renderFields()
{
$params = array_map('htmlspecialchars_decode', (array) stripslashes_deep(vc_post_param('params')));
$tag = stripslashes(vc_post_param('tag'));
require_once vc_path_dir('EDITORS_DIR', 'class-vc-edit-form-fields.php');
$fields = new Vc_Edit_Form_Fields($tag, $params);
$fields->render();
die;
}
示例11: build
/**
* Build edit form fields
*
* @deprecated 4.4
* @use Vc_Shortcode_Edit_Form::renderFields
*/
public function build()
{
$tag = vc_post_param('element');
$shortCode = stripslashes(vc_post_param('shortcode'));
require_once vc_path_dir('EDITORS_DIR', 'class-vc-edit-form-fields.php');
$fields = new Vc_Edit_Form_Fields($tag, shortcode_parse_atts($shortCode));
$fields->render();
die;
}
示例12: _vc_google_fonts_get_fonts
/**
* Load google fonts list for param
* To change this list use add_filters('vc_google_fonts_get_fonts_filter','your_custom_function'); and change array
* vc_filter: vc_google_fonts_get_fonts_filter
* @since 4.3
* @return array List of available fonts as array of objects. {"font_family":"Abril Fatface","font_styles":"regular","font_types":"400 regular:400:normal"}
*/
public function _vc_google_fonts_get_fonts()
{
global $wp_filesystem;
if (empty($wp_filesystem)) {
require_once ABSPATH . '/wp-admin/includes/file.php';
WP_Filesystem();
}
return apply_filters('vc_google_fonts_get_fonts_filter', json_decode($wp_filesystem->get_contents(vc_path_dir('ASSETS_DIR', 'js/params/google_fonts.json'))));
}
示例13: vc_init_vendor_acf
function vc_init_vendor_acf()
{
include_once ABSPATH . 'wp-admin/includes/plugin.php';
// Require plugin.php to use is_plugin_active() below
if (class_exists('acf') || is_plugin_active('advanced-custom-fields/acf.php') || is_plugin_active('advanced-custom-fields-pro/acf.php')) {
require_once vc_path_dir('VENDORS_DIR', 'plugins/class-vc-vendor-advanced-custom-fields.php');
$vendor = new Vc_Vendor_AdvancedCustomFields();
add_action('vc_after_set_mode', array($vendor, 'load'));
}
}
示例14: render
/**
* @param $settings
* @param $value
*
* @since 4.3
* @return string
*/
public function render($settings, $value)
{
$fields = array();
$values = array();
$set = isset($settings['settings'], $settings['settings']['fields']) ? $settings['settings']['fields'] : array();
extract($this->_vc_google_fonts_parse_attributes($set, $value));
ob_start();
include vc_path_dir('TEMPLATES_DIR', 'params/google_fonts/template.php');
return ob_get_clean();
}
示例15: vc_init_vendor_qtranslate
function vc_init_vendor_qtranslate()
{
include_once ABSPATH . 'wp-admin/includes/plugin.php';
// Require plugin.php to use is_plugin_active() below
if (is_plugin_active('qtranslate/qtranslate.php') || defined('QT_SUPPORTED_WP_VERSION')) {
require_once vc_path_dir('VENDORS_DIR', 'plugins/class-vc-vendor-qtranslate.php');
$vendor = new Vc_Vendor_Qtranslate();
add_action('vc_after_set_mode', array($vendor, 'load'));
}
}