本文整理匯總了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);
}
示例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);