Exemplo n.º 1
0
 /**
  * @deprecated
  */
 function sp_is_multiday($postId = null)
 {
     _deprecated_function(__FUNCTION__, '2.0', 'tribe_is_multiday()');
     return tribe_is_multiday($postId);
 }
    $alt_text = '';
}
post_class($alt_text, $post->ID);
$class = ob_get_contents();
ob_end_clean();
?>
<li <?php 
echo $class;
?>
>
	<div class="when">
		<?php 
$space = false;
$output = '';
echo tribe_get_start_date($post->ID);
if (tribe_is_multiday($post->ID) || !$event->AllDay) {
    echo ' - ' . tribe_get_end_date($post->ID);
}
if ($event->AllDay) {
    echo ' <small>(' . __('All Day', 'tribe-events-calendar') . ')</small>';
}
?>
 
	</div>
	<div class="event">
		<a href="<?php 
echo get_permalink($post->ID);
?>
"><?php 
echo $post->post_title;
?>
Exemplo n.º 3
0
            ?>
				<?php 
        } else {
            ?>
					<?php 
            the_content();
            ?>
				<?php 
        }
        ?>
			</div> <!-- End tribe-events-event-entry -->

			<div class="tribe-events-event-list-meta" itemprop="location" itemscope itemtype="http://schema.org/Place">
				<table cellspacing="0">
					<?php 
        if (tribe_is_multiday() || !tribe_get_all_day()) {
            ?>
					<tr>
						<td class="tribe-events-event-meta-desc"><?php 
            _e('Start:', 'tribe-events-calendar');
            ?>
</td>
						<td class="tribe-events-event-meta-value" itemprop="startDate" content="<?php 
            echo tribe_get_start_date();
            ?>
"><?php 
            echo tribe_get_start_date();
            ?>
</td>
					</tr>
					<tr>
Exemplo n.º 4
0
 /**
  * Sort Events by Day
  *
  * Maps events to days of the month.
  *
  * @param array $results Array of events from tribe_get_events()
  * @param string $date
  * @return array Days of the month with events as values
  * @since 2.0
  */
 function tribe_sort_by_month($results, $date)
 {
     global $post;
     $cutoff_time = tribe_get_option('multiDayCutoff', '12:00');
     if (preg_match('/(\\d{4})-(\\d{2})/', $date, $matches)) {
         $queryYear = $matches[1];
         $queryMonth = $matches[2];
     } else {
         return false;
         // second argument not a date we recognize
     }
     $monthView = array();
     for ($i = 1; $i <= 31; $i++) {
         $monthView[$i] = array();
     }
     foreach ($results as $event) {
         $post = $event;
         $started = false;
         list($startYear, $startMonth, $startDay) = explode('-', $event->EventStartDate);
         list($endYear, $endMonth, $endDay) = explode('-', $event->EventEndDate);
         list($startDay, $garbage) = explode(' ', $startDay);
         list($endDay, $garbage) = explode(' ', $endDay);
         for ($i = 1; $i <= 31; $i++) {
             $curDate = strtotime($queryYear . '-' . $queryMonth . '-' . $i);
             if ($i == $startDay && $startMonth == $queryMonth || strtotime($startYear . '-' . $startMonth) < strtotime($queryYear . '-' . $queryMonth)) {
                 $started = true;
             }
             // if last day of multiday event
             if (!tribe_get_all_day() && tribe_is_multiday($event->ID) && date('Y-m-d', $curDate) == date('Y-m-d', strtotime($event->EventEndDate))) {
                 $endTime = strtotime(date('Y-m-d', $curDate) . date('h:i A', strtotime($event->EventEndDate)));
                 $cutoffTime = strtotime(date('Y-m-d', $curDate) . $cutoff_time . "AM");
                 // if end time is before cutoff, then don't show
                 if ($endTime <= $cutoffTime) {
                     $started = false;
                 }
             }
             if ($started) {
                 $monthView[$i][] = $event;
             }
             if ($i == $endDay && $endMonth == $queryMonth) {
                 continue 2;
             }
         }
     }
     return $monthView;
 }
Exemplo n.º 5
0
$class = ob_get_contents();
ob_end_clean();
?>
<li <?php 
echo $class;
?>
>
	<div class="when">
		<?php 
$space = false;
$output = '';
echo tribe_get_start_date($post->ID);
if ($end && $event->EndDate != '') {
    if (tribe_get_all_day($post->ID) != 'yes' && tribe_is_multiday($post->ID) || tribe_get_all_day($post->ID) == 'yes' && tribe_is_multiday($post->ID)) {
        echo ' – <br/>' . tribe_get_end_date($post->ID);
    } elseif (tribe_get_all_day($post->ID) != 'yes' && !tribe_is_multiday($post->ID)) {
        echo ' – <br/>' . tribe_get_end_date($post->ID, false, 'g:i a');
    }
}
if ($event->AllDay) {
    echo ' <small><em>(' . __('All Day', 'tribe-events-calendar-pro') . ')</em></small>';
}
?>
	</div>
	<div class="event">
		<a href="<?php 
echo tribe_get_event_link($post);
?>
"><?php 
echo $post->post_title;
?>
Exemplo n.º 6
0
        ?>
				
				<?php 
        the_title('<h2 class="entry-title" itemprop="name"><a href="' . tribe_get_event_link() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark" itemprop="url">', '</a></h2>');
        ?>
				
 				<div class="entry-content tribe-events-event-entry" itemprop="description">
 					<?php 
        has_excerpt() ? the_excerpt() : the_content();
        ?>
				</div><!-- .tribe-events-event-entry -->
				
 				<div class="tribe-events-event-list-meta">
 					<table>
 						<?php 
        if (tribe_is_multiday()) {
            ?>
							<tr>
								<td class="tribe-events-event-meta-desc"><?php 
            _e('Start:', 'tribe-events-calendar-pro');
            ?>
</td>
								<td class="tribe-events-event-meta-value"><meta itemprop="startDate" content="<?php 
            echo tribe_get_start_date(null, false, 'Y-m-d');
            ?>
" /><?php 
            echo tribe_get_start_date();
            ?>
</td>
							</tr>
							<tr>
Exemplo n.º 7
0
</h4>
				<?php 
        }
        ?>
				<?php 
        the_title('<h2 class="entry-title" itemprop="name"><a href="' . tribe_get_event_link() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark" itemprop="url">', '</a></h2>');
        ?>
				<div class="entry-content tribe-events-event-entry" itemprop="description">
					<?php 
        has_excerpt() ? the_excerpt() : the_content();
        ?>
				</div> <!-- End tribe-events-event-entry -->
				<div class="tribe-events-event-list-meta">
					<table>
						<?php 
        if (tribe_is_multiday() || tribe_get_all_day() != 'yes') {
            ?>
						<tr>
							<td class="tribe-events-event-meta-desc"><?php 
            _e('Start:', 'tribe-events-calendar-pro');
            ?>
</td>
							<td class="tribe-events-event-meta-value"><meta itemprop="startDate" content="<?php 
            echo tribe_get_start_date(null, false, 'Y-m-d');
            ?>
" /><?php 
            echo tribe_get_start_date();
            ?>
</td>
						</tr>
						<tr>