• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vc_manager函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vc_manager函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_manager函数的具体用法?PHP vc_manager怎么用?PHP vc_manager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vc_manager函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: findShortcodeTemplate

 /**
  * Find html template for shortcode output.
  */
 protected function findShortcodeTemplate()
 {
     // Check template path in shortcode's mapping settings
     if (!empty($this->settings['html_template']) && is_file($this->settings('html_template'))) {
         return $this->setTemplate($this->settings['html_template']);
     }
     // Check template in theme directory
     $user_template = vc_manager()->getShortcodesTemplateDir($this->getFilename() . '.php');
     if (is_file($user_template)) {
         return $this->setTemplate($user_template);
     }
     // Check default place
     $default_dir = $this->getVcTableDefaultDir();
     if (is_file($default_dir . $this->getFilename() . '.php')) {
         return $this->setTemplate($default_dir . $this->getFilename() . '.php');
     }
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:20,代码来源:vc_table_shortcode.php


示例2: theme_content_types_field_callback

    /**
     * Themes Content types checkboxes list callback function
     * @deprecated 4.8
     */
    public function theme_content_types_field_callback()
    {
        // _deprecated_function( '\Vc_Settings::theme_content_types_field_callback', '4.8 (will be removed in 4.11)' );
        $pt_array = ($pt_array = get_option('wpb_js_theme_content_types')) ? $pt_array : vc_manager()->editorPostTypes();
        foreach ($this->getPostTypes() as $pt) {
            if (!in_array($pt, $this->getExcluded())) {
                $checked = in_array($pt, $pt_array) ? ' checked' : '';
                ?>
				<label>
					<input type="checkbox"<?php 
                echo $checked;
                ?>
 value="<?php 
                echo $pt;
                ?>
"
					       id="wpb_js_post_types_<?php 
                echo $pt;
                ?>
"
					       name="<?php 
                echo self::$field_prefix . 'theme_content_types';
                ?>
[]">
					<?php 
                echo $pt;
                ?>
				</label><br>
			<?php 
            }
        }
        ?>
		<p
			class="description indicator-hint"><?php 
        _e('Select content types available to Visual Composer.', 'js_composer');
        ?>
</p>
	<?php 
    }
开发者ID:iq007,项目名称:MadScape,代码行数:43,代码来源:class-vc-settings.php


示例3: vc_user_access

/**
 * Get access manager for current user.
 * HowTo: vc_user_access()->->with('editor')->can('frontend_editor');
 * @since 4.8
 * @return Vc_Current_User_Access;
 */
function vc_user_access()
{
    return vc_manager()->getCurrentUserAccess();
}
开发者ID:ksan5835,项目名称:maadithottam,代码行数:10,代码来源:helpers_factory.php


示例4: findBlockTemplate

	protected function findBlockTemplate() {
		$template_path = $this->block_template_dir_name . '/' . $this->block_template_filename;
		// Check template path in shortcode's mapping settings
		if ( ! empty( $this->settings['html_template'] ) && is_file( $this->settings( 'html_template' ) . $template_path ) ) {
			return $this->settings['html_template'] . $template_path;
		}
		// Check template in theme directory
		$user_template = vc_shortcodes_theme_templates_dir( $template_path );

		if ( is_file( $user_template ) ) {
			return $user_template;
		}
		// Check default place
		$default_dir = vc_manager()->getDefaultShortcodesTemplatesDir() . '/';
		if ( is_file( $default_dir . $template_path ) ) {
			return $default_dir . $template_path;
		}
		return $template_path;
	}
开发者ID:verbazend,项目名称:AWFA,代码行数:19,代码来源:vc-posts-grid.php


示例5: vc_plugin_name

/**
 * Plugin name for VC.
 *
 * @since 4.2
 * @return string
 */
function vc_plugin_name()
{
    return vc_manager()->pluginName();
}
开发者ID:chicosilva,项目名称:olharambiental,代码行数:10,代码来源:helpers_factory.php


示例6: theme_content_types_field_callback

    /**
     * Themes Content types checkboxes list callback function
     */
    public function theme_content_types_field_callback()
    {
        $pt_array = ($pt_array = get_option('wpb_js_theme_content_types')) ? $pt_array : vc_manager()->editorPostTypes();
        foreach ($this->getPostTypes() as $pt) {
            if (!in_array($pt, $this->getExcluded())) {
                $checked = in_array($pt, $pt_array) ? ' checked="checked"' : '';
                ?>
			<label>
				<input type="checkbox"<?php 
                echo $checked;
                ?>
 value="<?php 
                echo $pt;
                ?>
"
					   id="wpb_js_post_types_<?php 
                echo $pt;
                ?>
"
					   name="<?php 
                echo self::$field_prefix . 'theme_content_types';
                ?>
[]">
				<?php 
                echo $pt;
                ?>
			</label><br>
			<?php 
            }
        }
        ?>
	<p
	  class="description indicator-hint"><?php 
        _e("Select for which content types Visual Composer should be available during post creation/editing.", LANGUAGE_ZONE);
        ?>
</p>
	<?php 
    }
开发者ID:scottnkerr,项目名称:eeco,代码行数:41,代码来源:class-vc-settings.php


示例7: getUserTemplate

 /**
  * @param $template
  *
  * @deprecated
  * @return string
  */
 public static function getUserTemplate($template)
 {
     return vc_manager()->getShortcodesTemplateDir($template);
 }
开发者ID:polaris610,项目名称:medicalhound,代码行数:10,代码来源:class-vc-base.php


示例8: preg_replace

            }
        } else {
            $img_id = preg_replace('/[^\\d]/', '', $image);
        }
        // set rectangular
        if (preg_match('/_circle_2$/', $style)) {
            $style = preg_replace('/_circle_2$/', '_circle', $style);
            $img_size = $this->getImageSquareSize($img_id, $img_size);
        }
        if (!$img_size) {
            $img_size = 'medium';
        }
        $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'vc_single_image-img'));
        // don't show placeholder in public version if post doesn't have featured image
        if ('featured_image' === $source) {
            if (!$img && 'page' === vc_manager()->mode()) {
                return;
            }
        }
        break;
    case 'external_link':
        $dimensions = vcExtractDimensions($external_img_size);
        $hwstring = $dimensions ? image_hwstring($dimensions[0], $dimensions[1]) : '';
        $custom_src = $custom_src ? esc_attr($custom_src) : $default_src;
        $img = array('thumbnail' => '<img class="vc_single_image-img" ' . $hwstring . ' src="' . $custom_src . '" />');
        break;
    default:
        $img = false;
}
if (!$img) {
    $img['thumbnail'] = '<img class="vc_img-placeholder vc_single_image-img" src="' . $default_src . '" />';
开发者ID:severnrescue,项目名称:web,代码行数:31,代码来源:vc_single_image.php


示例9: getUserTemplate

 /**
  * @param $template
  *
  * @todo remove this (comment added on 4.8) also remove helpers
  * @deprecated 4.3
  * @return string
  */
 public static function getUserTemplate($template)
 {
     _deprecated_function('WPBakeryVisualComposer getUserTemplate', '4.3', 'Vc_Base getShortcodesTemplateDir');
     return vc_manager()->getShortcodesTemplateDir($template);
 }
开发者ID:hikaram,项目名称:wee,代码行数:12,代码来源:class-vc-base.php


示例10: vc_manager

<?php

if (us_is_vc_fe()) {
    $default_dir = vc_manager()->getDefaultShortcodesTemplatesDir() . '/';
    if (is_file($default_dir . 'vc_tabs.php')) {
        include $default_dir . 'vc_tabs.php';
        return;
    }
}
$attributes = shortcode_atts(array('timeline' => '', 'type' => '', 'el_class' => ''), $atts);
global $first_tab, $first_tab_title, $auto_open, $is_timeline;
$auto_open = TRUE;
$first_tab_title = TRUE;
$first_tab = TRUE;
if ($attributes['el_class'] != '') {
    $attributes['el_class'] = ' ' . $attributes['el_class'];
}
//$type_class = ($attributes['type'] != '')?' type_'.$attributes['type']:' type_1';
if ($attributes['timeline'] == 'yes') {
    $is_timeline = TRUE;
    $content_titles = str_replace('[vc_tab', '[timepoint_title', $content);
    $content_titles = str_replace('[/vc_tab', '[/timepoint_title', $content_titles);
    $output = '<div class="w-timeline' . $attributes['el_class'] . '"><div class="w-timeline-list">' . do_shortcode($content_titles) . '</div><div class="w-timeline-sections">' . do_shortcode($content) . '</div></div>';
} else {
    $is_timeline = FALSE;
    $tabs_id = 'tabs_' . rand(99999, 999999);
    $tabs_id_string = ' id="' . $tabs_id . '"';
    $content_titles = str_replace('[vc_tab', '[item_title', $content);
    $content_titles = str_replace('[/vc_tab', '[/item_title', $content_titles);
    $output = '<div class="w-tabs' . $attributes['el_class'] . '"' . $tabs_id_string . '><div class="w-tabs-list">' . do_shortcode($content_titles) . '</div>' . do_shortcode($content) . '</div>';
}
开发者ID:ConceptHaus,项目名称:atra,代码行数:31,代码来源:vc_tabs.php


示例11: vc_shortcodes_theme_templates_dir

 /**
  * Get custom theme template path
  * @since 4.2
  *
  * @param $template - filename for template
  *
  * @return string
  */
 function vc_shortcodes_theme_templates_dir($template)
 {
     return vc_manager()->getShortcodesTemplateDir($template);
 }
开发者ID:syncopetwice,项目名称:STG,代码行数:12,代码来源:helpers_api.php


示例12: findShortcodeTemplate

 /**
  * Find html template for shortcode output.
  */
 protected function findShortcodeTemplate()
 {
     // Check template path in shortcode's mapping settings
     if (!empty($this->settings['html_template']) && is_file($this->settings('html_template'))) {
         return $this->setTemplate($this->settings['html_template']);
     }
     // Check template in theme directory
     $user_template = vc_shortcodes_theme_templates_dir($this->getFilename() . '.php');
     $parent_user_template = vc_shortcodes_theme_parent_templates_dir($this->getFilename() . '.php');
     //echo $user_template;
     if (is_file($user_template)) {
         return $this->setTemplate($user_template);
     } else {
         if (is_file($parent_user_template)) {
             return $this->setTemplate($parent_user_template);
         }
     }
     // Check default place
     $default_dir = vc_manager()->getDefaultShortcodesTemplatesDir() . '/';
     if (is_file($default_dir . $this->getFilename() . '.php')) {
         return $this->setTemplate($default_dir . $this->getFilename() . '.php');
     }
 }
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:26,代码来源:shortcodes.php


示例13: x_visual_composer_is_front_end_editor

 function x_visual_composer_is_front_end_editor()
 {
     return function_exists('vc_manager') && vc_manager()->mode() == 'page_editable';
 }
开发者ID:kevinotsuka,项目名称:datapop,代码行数:4,代码来源:visual-composer.php


示例14: disable_updater

function disable_updater()
{
    vc_manager()->disableUpdater();
}
开发者ID:novichkovv,项目名称:prlab,代码行数:4,代码来源:vc-extend.php



注:本文中的vc_manager函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vc_map函数代码示例发布时间:2022-05-23
下一篇:
PHP vc_license函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap