本文整理汇总了PHP中TribeEvents::removeNotice方法的典型用法代码示例。如果您正苦于以下问题:PHP TribeEvents::removeNotice方法的具体用法?PHP TribeEvents::removeNotice怎么用?PHP TribeEvents::removeNotice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TribeEvents
的用法示例。
在下文中一共展示了TribeEvents::removeNotice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tribe_include_view_list
/**
* Accepts an array of query arguments, retrieves them, and returns the html for those events in list view
*
* Optional inline example:
* < code >
* <?php
* echo myfunction();
* ?>
* </ code >
*
* @param array $args Args to be passed to TribeEventsQuery::getEvents()
* @param bool $initialize Whether the list view template class needs to be included and initialized
*
* @return string
**/
function tribe_include_view_list($args = null, $initialize = true)
{
global $wp_query;
// hijack the main query to load the events via provided $args
if (!is_null($args) || !($wp_query->tribe_is_event || $wp_query->tribe_is_event_category)) {
$reset_q = $wp_query;
$wp_query = TribeEventsQuery::getEvents($args, true);
}
// single-event notices are jumping in on this init when loading as a module
TribeEvents::removeNotice('event-past');
// get the list view template
ob_start();
if ($initialize) {
tribe_initialize_view('Tribe_Events_List_Template');
}
tribe_get_view('list/content');
$list_view_html = ob_get_clean();
// fix the error of our ways
if (!empty($reset_q)) {
$wp_query = $reset_q;
}
// return the parsed template
return $list_view_html;
}