本文整理汇总了PHP中Tribe__Events__Template_Factory::get_title方法的典型用法代码示例。如果您正苦于以下问题:PHP Tribe__Events__Template_Factory::get_title方法的具体用法?PHP Tribe__Events__Template_Factory::get_title怎么用?PHP Tribe__Events__Template_Factory::get_title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tribe__Events__Template_Factory
的用法示例。
在下文中一共展示了Tribe__Events__Template_Factory::get_title方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_title
/**
* Get the title for day view
* @param $title
* @param null $sep
*
* @return string
*/
protected function get_title($original_title, $sep = null)
{
$new_title = parent::get_title($original_title, $sep);
if (has_filter('tribe_events_day_view_title')) {
_deprecated_function("The 'tribe_events_day_view_title' filter", '3.8', " the 'tribe_get_events_title' filter");
$title_date = date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate')));
$new_title = apply_filters('tribe_events_day_view_title', $new_title, $sep, $title_date);
}
return $new_title;
}
示例2: get_title
/**
* Get the title for list view
* @param $title
* @param null $sep
*
* @return string
*/
protected function get_title($original_title, $sep = null)
{
$new_title = parent::get_title($original_title, $sep);
if (tribe_is_upcoming() && has_filter('tribe_upcoming_events_title')) {
_deprecated_function("The 'tribe_upcoming_events_title' filter", '3.8', " the 'tribe_get_events_title' filter");
$new_title = apply_filters('tribe_upcoming_events_title', $new_title, $sep);
} elseif (has_filter('tribe_past_events_title')) {
_deprecated_function("The 'tribe_past_events_title' filter", '3.8', " the 'tribe_get_events_title' filter");
$new_title = apply_filters('tribe_past_events_title', $new_title, $sep);
}
return $new_title;
}
示例3: get_title
/**
* Get the title for month view
*
* @param string $original_title
* @param string $sep
*
* @return string
*/
protected function get_title($original_title, $sep = null)
{
$new_title = parent::get_title($original_title, $sep);
if (get_query_var('eventDate') && has_filter('tribe_month_grid_view_title')) {
_deprecated_function("The 'tribe_month_grid_view_title' filter", '3.8', " the 'tribe_get_events_title' filter");
$title_date = date_i18n(tribe_get_date_option('monthAndYearFormat', 'F Y'), strtotime(get_query_var('eventDate')));
$new_title = apply_filters('tribe_month_grid_view_title', $new_title, $sep, $title_date);
} elseif (has_filter('tribe_events_this_month_title')) {
_deprecated_function("The 'tribe_events_this_month_title' filter", '3.8', " the 'tribe_get_events_title' filter");
$new_title = apply_filters('tribe_events_this_month_title', $new_title, $sep);
}
return $new_title;
}