/** * 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) . '"'; } }
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();
?> <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(); ?>
/** * 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 . '"'; } }