本文整理汇总了PHP中tribe_get_current_template函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_current_template函数的具体用法?PHP tribe_get_current_template怎么用?PHP tribe_get_current_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_get_current_template函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tribe_events_the_header_attributes
/**
* Prints out data attributes used in the template header tags
*
* @category Events
* @param string|null $current_view
*
* @return void
* @todo move to template classes
**/
function tribe_events_the_header_attributes($current_view = null)
{
$attrs = array();
$current_view = !empty($current_view) ? $current_view : basename(tribe_get_current_template());
$attrs['data-title'] = wp_title('|', false, 'right');
switch ($current_view) {
case 'month.php':
$attrs['data-view'] = 'month';
$attrs['data-date'] = date('Y-m', strtotime(tribe_get_month_view_date()));
$attrs['data-baseurl'] = tribe_get_gridview_link(false);
break;
case 'day.php':
$attrs['data-startofweek'] = get_option('start_of_week');
break;
case 'list.php':
$attrs['data-startofweek'] = get_option('start_of_week');
$attrs['data-view'] = 'list';
if (tribe_is_upcoming()) {
$attrs['data-baseurl'] = tribe_get_listview_link(false);
} elseif (tribe_is_past()) {
$attrs['data-view'] = 'past';
$attrs['data-baseurl'] = tribe_get_listview_past_link(false);
}
break;
}
if (has_filter('tribe_events_mobile_breakpoint')) {
$attrs['data-mobilebreak'] = tribe_get_mobile_breakpoint();
}
$attrs = apply_filters('tribe_events_header_attributes', $attrs, $current_view);
foreach ($attrs as $attr => $value) {
echo " {$attr}=" . '"' . esc_attr($value) . '"';
}
}
示例2: the_post
the_post();
global $post;
?>
<div id="post-<?php
the_ID();
?>
" <?php
post_class();
?>
>
<h2 class="entry-title"><?php
the_title();
?>
</h2>
<?php
include tribe_get_current_template();
?>
<?php
edit_post_link(__('Edit', 'tribe-events-calendar'), '<span class="edit-link">', '</span>');
?>
</div><!-- post -->
<?php
if (tribe_get_option('showComments', 'no') == 'yes') {
comments_template();
}
?>
</div><!-- #content -->
</div><!--#container-->
<?php
get_sidebar();
tribe_events_after_html();
示例3: tribe_events_title
?>
<div class="skin">
<?php
if (!(isset($image_url) && strlen($image_url) > 4)) {
?>
<h1 class="post-title"><span><?php
tribe_events_title();
?>
</span></h1>
<?php
}
?>
<?php
echo tribe_get_current_template();
?>
</div>
</div>
<div class="content-aside">
<div class="skin">
<h1 class="skip"><?php
_e('More information', 'piratenkleider');
?>
</h1>
<?php
get_piratenkleider_seitenmenu($options['zeige_sidebarpagemenu'], $options['zeige_subpagesonly'], $options['seitenmenu_mode']);
get_sidebar();
?>
示例4: tribe_events_the_header_attributes
/**
* Prints out data attributes used in the template header tags
*
* @param string|null $current_view
* @return void
* @since 3.0
**/
function tribe_events_the_header_attributes($current_view = null)
{
$attrs = array();
$current_view = !empty($current_view) ? $current_view : basename(tribe_get_current_template());
$attrs['data-title'] = wp_title('»', false);
switch ($current_view) {
case 'month.php':
$attrs['data-view'] = 'month';
$attrs['data-date'] = date('Y-m', strtotime(tribe_get_month_view_date()));
$attrs['data-baseurl'] = tribe_get_gridview_link(false);
break;
case 'list.php':
$attrs['data-view'] = 'list';
if (tribe_is_upcoming()) {
$attrs['data-baseurl'] = tribe_get_listview_link(false);
} elseif (tribe_is_past()) {
$attrs['data-view'] = 'past';
$attrs['data-baseurl'] = tribe_get_listview_past_link(false);
}
break;
}
$attrs = apply_filters('tribe_events_header_attributes', $attrs, $current_view);
foreach ($attrs as $attr => $value) {
echo " {$attr}=" . '"' . $value . '"';
}
}