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


PHP EEH_Template::load_espresso_theme_functions方法代码示例

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


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

示例1: template_include

 /**
  * template_include
  *
  * @access public
  * @param  string $template
  * @return string
  */
 public function template_include($template)
 {
     // not a custom template?
     if (EE_Registry::instance()->load_core('Front_Controller', array(), false, true)->get_selected_template() != 'single-espresso_venues.php') {
         EEH_Template::load_espresso_theme_functions();
         // then add extra event data via hooks
         add_filter('the_title', array($this, 'the_title'), 100, 1);
         add_filter('the_content', array($this, 'venue_details'), 100);
         // don't display entry meta because the existing theme will take car of that
         add_filter('FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false');
     }
     return $template;
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:20,代码来源:EED_Venue_Single.module.php

示例2: template_include

 /**
  * 	template_include
  *
  *  	@access 	public
  *  	@return 	void
  */
 public function template_include($template)
 {
     // not a custom template?
     if (EE_Front_Controller::instance()->get_selected_template() != 'archive-espresso_venues.php') {
         EEH_Template::load_espresso_theme_functions();
         // then add extra event data via hooks
         add_filter('the_title', array($this, 'the_title'), 100, 2);
         // don't know if theme uses the_excerpt
         add_filter('the_excerpt', array($this, 'venue_details'), 100);
         add_filter('the_excerpt', array($this, 'venue_location'), 110);
         // or the_content
         add_filter('the_content', array($this, 'venue_details'), 100);
         add_filter('the_content', array($this, 'venue_location'), 110);
         // don't diplay entry meta because the existing theme will take car of that
         add_filter('FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false');
     }
     return $template;
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:24,代码来源:EED_Venues_Archive.module.php

示例3: template_include

 /**
  *    template_include
  *
  * @access    public
  * @param string $template
  * @return    string
  */
 public function template_include($template = '')
 {
     // don't add content filter for dedicated EE child themes or private posts
     EE_Registry::instance()->load_helper('Template');
     if (!EEH_Template::is_espresso_theme()) {
         /** @type EE_Events_Archive_Config $config */
         $config = $this->config();
         // add status banner ?
         if ($config->display_status_banner) {
             add_filter('the_title', array('EED_Events_Archive', 'the_title'), 100, 2);
         }
         // if NOT a custom template
         if (EE_Front_Controller::instance()->get_selected_template() != 'archive-espresso_events.php' || apply_filters('FHEE__EED_Event_Archive__template_include__allow_custom_selected_template', FALSE)) {
             // don't display entry meta because the existing theme will take care of that
             add_filter('FHEE__EED_Events_Archive__template_include__events_list_active', '__return_true');
             // load functions.php file for the theme (loaded by WP if using child theme)
             EEH_Template::load_espresso_theme_functions();
             // because we don't know if the theme is using the_excerpt()
             add_filter('the_excerpt', array('EED_Events_Archive', 'event_details'), 100, 1);
             // or the_content
             add_filter('the_content', array('EED_Events_Archive', 'event_details'), 100, 1);
             // and just in case they are running get_the_excerpt() which DESTROYS things
             add_filter('get_the_excerpt', array('EED_Events_Archive', 'get_the_excerpt'), 1, 1);
             // don't display entry meta because the existing theme will take care of that
             add_filter('FHEE__content_espresso_events_details_template__display_entry_meta', '__return_false');
         }
     }
     return $template;
 }
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:36,代码来源:EED_Events_Archive.module.php

示例4: template_include

 /**
  * 	template_include
  *
  *  	@access 	public
  *  	@return 	void
  */
 public function template_include($template)
 {
     if (EE_Registry::instance()->CFG->template_settings->EED_Event_Single->display_status_banner_single) {
         add_filter('the_title', array('EED_Event_Single', 'the_title'), 100, 2);
     }
     // not a custom template?
     if (EE_Front_Controller::instance()->get_selected_template() != 'single-espresso_events.php' && !post_password_required()) {
         EEH_Template::load_espresso_theme_functions();
         // then add extra event data via hooks
         add_action('loop_start', array('EED_Event_Single', 'loop_start'));
         add_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
         add_action('loop_end', array('EED_Event_Single', 'loop_end'));
         // don't diplay entry meta because the existing theme will take car of that
         add_filter('FHEE__content_espresso_events_details_template__display_entry_meta', '__return_false');
     }
     return $template;
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:23,代码来源:EED_Event_Single.module.php

示例5: template_include

 /**
  *    template_include
  *
  * @access 	public
  * @param 	string $template
  * @return 	string
  */
 public function template_include($template)
 {
     global $post;
     /** @type EE_Event_Single_Config $config */
     $config = $this->config();
     if ($config->display_status_banner_single) {
         add_filter('the_title', array('EED_Event_Single', 'the_title'), 100, 2);
     }
     // not a custom template?
     if (EE_Registry::instance()->load_core('Front_Controller', array(), false, true)->get_selected_template() != 'single-espresso_events.php' || apply_filters('FHEE__EED_Event_Single__template_include__allow_custom_selected_template', FALSE) && !post_password_required($post)) {
         EEH_Template::load_espresso_theme_functions();
         // then add extra event data via hooks
         add_action('loop_start', array('EED_Event_Single', 'loop_start'));
         add_filter('get_the_excerpt', array('EED_Event_Single', 'get_the_excerpt'), 1, 1);
         add_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
         add_action('loop_end', array('EED_Event_Single', 'loop_end'));
         // don't display entry meta because the existing theme will take car of that
         add_filter('FHEE__content_espresso_events_details_template__display_entry_meta', '__return_false');
     }
     return $template;
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:28,代码来源:EED_Event_Single.module.php

示例6: template_include

 /**
  *    template_include
  *
  * @access    public
  * @param string $template
  * @return    string
  */
 public function template_include($template = '')
 {
     // ensure valid EE_Events_Archive_Config() object exists
     //		EED_Events_Archive::_set_config();
     // don't add content filter for dedicated EE child themes or private posts
     if (!EEH_Template::is_espresso_theme() && !post_password_required()) {
         // add status banner ?
         if ($this->config()->display_status_banner) {
             add_filter('the_title', array('EED_Events_Archive', 'the_title'), 100, 2);
         }
         // if NOT a custom template
         if (EE_Front_Controller::instance()->get_selected_template() != 'archive-espresso_events.php') {
             // load functions.php file for the theme (loaded by WP if using child theme)
             EEH_Template::load_espresso_theme_functions();
             // because we don't know if the theme is using the_excerpt()
             add_filter('the_excerpt', array('EED_Events_Archive', 'event_details'), 100, 1);
             // or the_content
             add_filter('the_content', array('EED_Events_Archive', 'event_details'), 100, 1);
             // and just in case they are running get_the_excerpt() which DESTROYS things
             add_filter('get_the_excerpt', array('EED_Events_Archive', 'get_the_excerpt'), 1, 1);
             // don't display entry meta because the existing theme will take care of that
             add_filter('FHEE__content_espresso_events_details_template__display_entry_meta', '__return_false');
         }
     }
     return $template;
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:33,代码来源:EED_Events_Archive.module.php

示例7: template_include

 /**
  * deciding what template to include for person details.
  *
  * @param string $template Template being included
  * @return string new template
  * @throws \EE_Error
  */
 public function template_include($template)
 {
     global $post;
     // not a custom template?
     if (EE_Registry::instance()->load_core('Front_Controller', array(), false)->get_selected_template() != 'single-espresso_people.php' && !post_password_required($post)) {
         EEH_Template::load_espresso_theme_functions();
         //add extra people data
         add_filter('the_content', array('EED_People_Single', 'person_details'), 100);
     }
     return $template;
 }
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:18,代码来源:EED_People_Single.module.php


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