本文整理汇总了PHP中Tribe__Events__Template_Factory::nothing_found_notice方法的典型用法代码示例。如果您正苦于以下问题:PHP Tribe__Events__Template_Factory::nothing_found_notice方法的具体用法?PHP Tribe__Events__Template_Factory::nothing_found_notice怎么用?PHP Tribe__Events__Template_Factory::nothing_found_notice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tribe__Events__Template_Factory
的用法示例。
在下文中一共展示了Tribe__Events__Template_Factory::nothing_found_notice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: nothing_found_notice
protected function nothing_found_notice()
{
$events_label_plural = tribe_get_event_label_plural();
list($search_term, $tax_term, $geographic_term) = $this->get_search_terms();
if (empty($search_term) && empty($geographic_term) && !empty($tax_term)) {
Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No matching %s listed under %s scheduled for <strong>%s</strong>. Please try another day.', 'tribe-events-calendar'), strtolower($events_label_plural), $tax_term, date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate')))));
} elseif (empty($search_term) && empty($geographic_term)) {
Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No %s scheduled for <strong>%s</strong>. Please try another day.', 'tribe-events-calendar'), strtolower($events_label_plural), date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate')))));
} else {
parent::nothing_found_notice();
}
}
示例2: nothing_found_notice
protected function nothing_found_notice()
{
$events_label_plural_lowercase = tribe_get_event_label_plural_lowercase();
list($search_term, $tax_term, $geographic_term) = $this->get_search_terms();
if (empty($search_term) && empty($geographic_term) && !empty($tax_term)) {
Tribe__Notices::set_notice('events-not-found', sprintf(esc_html__('No matching %1$s listed under %2$s scheduled for %3$s. Please try another day.', 'the-events-calendar'), $events_label_plural_lowercase, $tax_term, '<strong>' . date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate'))) . '</strong>'));
} elseif (empty($search_term) && empty($geographic_term)) {
Tribe__Notices::set_notice('events-not-found', sprintf(esc_html__('No %1$s scheduled for %2$s. Please try another day.', 'the-events-calendar'), $events_label_plural_lowercase, '<strong>' . date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate'))) . '</strong>'));
} else {
parent::nothing_found_notice();
}
}