当前位置: 首页>>代码示例>>PHP>>正文


PHP WPBakeryVisualComposer::getUserTemplate方法代码示例

本文整理汇总了PHP中WPBakeryVisualComposer::getUserTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBakeryVisualComposer::getUserTemplate方法的具体用法?PHP WPBakeryVisualComposer::getUserTemplate怎么用?PHP WPBakeryVisualComposer::getUserTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPBakeryVisualComposer的用法示例。


在下文中一共展示了WPBakeryVisualComposer::getUserTemplate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 = WPBakeryVisualComposer::getUserTemplate($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:Anciela,项目名称:anciela.info,代码行数:20,代码来源:vc_table_shortcode.php

示例2: getTemplatePath

 public function getTemplatePath($key)
 {
     $template = isset($this->templates[$key]) ? $this->templates[$key] : false;
     if (!$template) {
         return false;
     }
     // Check template path in shortcode's mapping settings
     if (is_array($template) && isset($template['path']) && !empty($template['path'])) {
         return $template['path'];
     }
     // Check template in theme directory
     $user_template = WPBakeryVisualComposer::getUserTemplate($this->getFileName($key));
     if (is_file($user_template)) {
         return $this->setTemplate($key, $user_template);
     }
     // Check default place
     $default_dir = WPBakeryVisualComposer::defaultTemplatesDIR();
     if (is_file($default_dir . $this->getFilename($key))) {
         return $this->setTemplate($key, $default_dir . $this->getFileName($key));
     }
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:21,代码来源:teaser_template.php

示例3: 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 = WPBakeryVisualComposer::getUserTemplate($template_path);
     if (is_file($user_template)) {
         return $user_template;
     }
     // Check default place
     $default_dir = WPBakeryVisualComposer::defaultTemplatesDIR();
     if (is_file($default_dir . $template_path)) {
         return $default_dir . $template_path;
     }
     return $template_path;
 }
开发者ID:ksingh812,项目名称:thub-old,代码行数:19,代码来源:posts_grid.php

示例4: getPartial

 protected function getPartial($partial)
 {
     // Check template path in shortcode's mapping settings
     if (isset($this->partial_paths[$partial])) {
         return $this->partial_paths[$partial];
     }
     // Check template in theme directory
     $user_template = WPBakeryVisualComposer::getUserTemplate($this->getPartialFilename($partial));
     if (is_file($user_template)) {
         return $this->setPartialTemplate($partial, $user_template);
     }
     // Check default place
     $default_dir = WPBakeryVisualComposer::defaultTemplatesDIR();
     $default_dir . $this->getPartialFilename($partial);
     if (is_file($default_dir . $this->getPartialFilename($partial))) {
         return $this->setPartialTemplate($partial, $default_dir . $this->getPartialFilename($partial));
     }
 }
开发者ID:ksingh812,项目名称:thub-old,代码行数:18,代码来源:posts_grid.php


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