本文整理汇总了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);