當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EEH_Template::get_template_part方法代碼示例

本文整理匯總了PHP中EEH_Template::get_template_part方法的典型用法代碼示例。如果您正苦於以下問題:PHP EEH_Template::get_template_part方法的具體用法?PHP EEH_Template::get_template_part怎麽用?PHP EEH_Template::get_template_part使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在EEH_Template的用法示例。


在下文中一共展示了EEH_Template::get_template_part方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: espresso_get_template_part

 /**
  * espresso_get_template_part
  * basically a copy of the WordPress get_template_part() function but uses EEH_Template::locate_template() instead, and doesn't add base versions of files
  * so not a very useful function at all except that it adds familiarity PLUS filtering based off of the entire template part name
  *
  * @param string $slug The slug name for the generic template.
  * @param string $name The name of the specialised template.
  * @return string        the html output for the formatted money value
  */
 function espresso_get_template_part($slug = NULL, $name = NULL)
 {
     EEH_Template::get_template_part($slug, $name);
 }
開發者ID:DavidSteinbauer,項目名稱:event-espresso-core,代碼行數:13,代碼來源:EEH_Template.helper.php

示例2: apply_filters

 * @type bool       $show_gravatar  whether to show gravatar or not.
 */
$no_attendees_message = apply_filters('FHEE__loop-espresso_attendees-shortcode__template__no_attendees_message', __('No Attendees Yet', 'event_espresso'));
?>

<div class="event-attendees">
	<?php 
do_action('AHEE__loop-espresso_event_attendees__before', $contacts, $event, $datetime, $ticket, $show_gravatar);
?>
	<?php 
if ($contacts) {
    ?>
		<ul class="event-attendees-list">
			<?php 
    foreach ($contacts as $contact) {
        EEH_Template::get_template_part('content', 'espresso_event_attendees', array('contact' => $contact, 'show_gravatar' => $show_gravatar));
    }
    ?>
		</ul>
	<?php 
} else {
    ?>
		<p><?php 
    echo $no_attendees_message;
    ?>
</p>
	<?php 
}
?>
	<?php 
do_action('AHEE__loop-espresso_event_attendees__after', $contacts, $event, $datetime, $ticket, $show_gravatar);
開發者ID:DavidSteinbauer,項目名稱:event-espresso-core,代碼行數:31,代碼來源:loop-espresso_event_attendees.php


注:本文中的EEH_Template::get_template_part方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。