本文整理汇总了PHP中tribe_is_list_view函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_is_list_view函数的具体用法?PHP tribe_is_list_view怎么用?PHP tribe_is_list_view使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_is_list_view函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: grve_events_calendar_is_overview
/**
* Helper function to check if is Events Calendar Overview Page
*/
function grve_events_calendar_is_overview()
{
if (grve_events_calendar_enabled()) {
if (tribe_is_list_view() || tribe_is_day() || tribe_is_month()) {
return true;
}
}
if (grve_events_calendar_pro_enabled()) {
if (tribe_is_week() || tribe_is_map() || tribe_is_photo()) {
return true;
}
}
return false;
}
开发者ID:poweronio,项目名称:mbsite,代码行数:17,代码来源:grve-events-calendar-functions.php
示例2: get_current_template_class
/**
* Get the correct internal page template
*
* @return string Template class
*/
public static function get_current_template_class()
{
$class = '';
// list view
if (tribe_is_list_view() || tribe_is_showing_all()) {
$class = 'Tribe_Events_List_Template';
} else {
if (tribe_is_month()) {
$class = 'Tribe_Events_Month_Template';
} else {
if (is_singular(TribeEvents::POSTTYPE)) {
$class = 'Tribe_Events_Single_Event_Template';
}
}
}
// apply filters
return apply_filters('tribe_current_events_template_class', $class);
}
开发者ID:TyRichards,项目名称:river_of_life,代码行数:23,代码来源:tribe-templates.class.php
示例3: get_current_template_class
/**
* Get the correct internal page template
*
* @return string Template class
*/
public static function get_current_template_class()
{
$class = '';
// list view
if (tribe_is_list_view() || tribe_is_showing_all() || tribe_is_ajax_view_request('list')) {
$class = 'Tribe__Events__Template__List';
} elseif (tribe_is_month() || tribe_is_ajax_view_request('month')) {
$class = 'Tribe__Events__Template__Month';
} elseif (tribe_is_day() || tribe_is_ajax_view_request('day')) {
$class = 'Tribe__Events__Template__Day';
} elseif (is_singular(Tribe__Events__Main::POSTTYPE)) {
$class = 'Tribe__Events__Template__Single_Event';
}
// apply filters
// @todo remove deprecated filter in 3.4
return apply_filters('tribe_events_current_template_class', apply_filters('tribe_current_events_template_class', $class));
}
开发者ID:TMBR,项目名称:johnjohn,代码行数:22,代码来源:Templates.php
示例4: setup_date_search_in_bar
/**
* Set up the date search in the tribe events bar.
*
* @param array $filters The current filters in the bar array.
*
* @return array The modified filters array.
*/
public function setup_date_search_in_bar($filters)
{
global $wp_query;
$value = apply_filters('tribe-events-bar-date-search-default-value', '');
if (!empty($_REQUEST['tribe-bar-date'])) {
$value = $_REQUEST['tribe-bar-date'];
}
$caption = __('Date', 'the-events-calendar');
if (tribe_is_month()) {
$caption = sprintf(__('%s In', 'the-events-calendar'), $this->plural_event_label);
} elseif (tribe_is_list_view()) {
$caption = sprintf(__('%s From', 'the-events-calendar'), $this->plural_event_label);
} elseif (tribe_is_day()) {
$caption = __('Day Of', 'the-events-calendar');
$value = date(Tribe__Events__Date_Utils::DBDATEFORMAT, strtotime($wp_query->query_vars['eventDate']));
}
$caption = apply_filters('tribe_bar_datepicker_caption', $caption);
$filters['tribe-bar-date'] = array('name' => 'tribe-bar-date', 'caption' => $caption, 'html' => '<input type="text" name="tribe-bar-date" style="position: relative;" id="tribe-bar-date" value="' . esc_attr($value) . '" placeholder="' . esc_attr__('Date', 'the-events-calendar') . '"><input type="hidden" name="tribe-bar-date-day" id="tribe-bar-date-day" class="tribe-no-param" value="">');
return $filters;
}
开发者ID:kevinaxu,项目名称:99boulders,代码行数:27,代码来源:Main.php
示例5: tribe_is_upcoming
/**
* Upcoming Loop View Test
*
* Returns true if the query is set for upcoming events, false otherwise
*
* @return bool
*/
function tribe_is_upcoming()
{
global $wp_query;
$is_upcoming = tribe_is_list_view() && !tribe_is_past() ? true : false;
return apply_filters('tribe_is_upcoming', $is_upcoming);
}
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:13,代码来源:loop.php
示例6: types_render_field
}
}
}
}
}
}
?>
</h1>
<?php
if (is_single()) {
$subtitle = types_render_field("subtitle", array("raw" => "true"));
if (!empty($subtitle)) {
echo "<h2 class='subtitle'>{$subtitle}</h2>";
}
}
if (tribe_is_month() || tribe_is_list_view()) {
tribe_get_template_part('modules/bar');
}
?>
</header>
</div> <!-- end left block -->
<?php
}
?>
<nav role="navigation" class="site-navigation">
<div class="home-page-link"><a href="<?php
echo esc_url(home_url('/'));
?>
" class="icon-home"><span>Home</span></a></div>
<h1 class="assistive-text icon-menu"><span>Menu</span></h1>
<div class="assistive-text skip-link"><a href="#content" title="Skip to content">Skip to content</a></div>
开发者ID:angelayunwu,项目名称:english-channel-wordpress-theme,代码行数:31,代码来源:header.php
示例7: list_view_helper
/**
* Help to ensure the list view works on the front page (when it is set to be the
* default view).
*
* @param $template
* @return string
*/
public function list_view_helper($template)
{
global $wp_query;
// Determine if it's appropriate to interfere
$events_frontpage = $wp_query->get('eventrocket_frontpage');
$is_list = tribe_is_list_view();
$single_template_chosen = false !== strpos($template, 'single-event.php');
// Bow out gracefully if we're not needed here
if (!($events_frontpage && $is_list && $single_template_chosen)) {
return $template;
}
// Otherwise, try to enforce use of the list view template
return Tribe__Events__Templates::getTemplateHierarchy('list', array('disable_view_check' => true));
}
开发者ID:simple-beck,项目名称:project-gc,代码行数:21,代码来源:front-page-events.php
示例8: dttheme_events_breadcrumb
function dttheme_events_breadcrumb()
{
global $post, $wp_query;
$delimiter = ' class = "fa ' . dttheme_option('general', 'breadcrumb-delimiter') . '"';
$this->options = array('before' => "<span {$delimiter} > ", 'after' => ' </span>');
$markup = $this->options['before'] . $this->options['after'];
echo '<div class="breadcrumb">
<a href="' . home_url() . '">' . __('Home', 'dt_themes') . '</a>';
echo $markup;
echo '<a href="' . tribe_get_events_link() . '">' . __('Events', 'dt_themes') . '</a>';
if (tribe_is_month() && !is_tax()) {
echo $markup;
echo '<span class="current">' . __('Events This Month', 'dt_themes') . '</span>';
} elseif (class_exists('Tribe__Events__Pro__Main') && tribe_is_week()) {
echo $markup;
echo '<span class="current">' . __('Events This Week', 'dt_themes') . '</span>';
} elseif (class_exists('Tribe__Events__Pro__Main') && tribe_is_day()) {
echo $markup;
echo '<span class="current">' . __('Events Today', 'dt_themes') . '</span>';
} elseif (class_exists('Tribe__Events__Pro__Main') && tribe_is_map()) {
echo $markup;
echo '<span class="current">' . __('Upcoming Events', 'dt_themes') . '</span>';
} elseif (class_exists('Tribe__Events__Pro__Main') && tribe_is_photo()) {
echo $markup;
echo '<span class="current">' . __('Upcoming Events', 'dt_themes') . '</span>';
} elseif (tribe_is_list_view()) {
echo $markup;
echo '<span class="current">' . __('Upcoming Events', 'dt_themes') . '</span>';
} elseif (is_single()) {
echo $markup;
$post_title = $wp_query->post->post_title;
echo '<span class="current">' . $post_title . '</span>';
} elseif (tribe_is_month() && is_tax()) {
$term_slug = $wp_query->query_vars['tribe_events_cat'];
$term = get_term_by('slug', $term_slug, 'tribe_events_cat');
$name = $term->name;
echo $markup;
echo '<span class="current">' . $name . '</span>';
} elseif (is_tag()) {
echo $markup;
echo '<span class="current">' . single_tag_title('', FALSE) . '</span>';
}
echo '</div>';
}
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:44,代码来源:register_public.php
注:本文中的tribe_is_list_view函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论