daily pastebin goal
53%
SHARE
TWEET

Mark first day of multiday events (month view)

BakerMan Nov 29th, 2013 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Month Single Event
  4.  *
  5.  * This has been customized to add an extra CSS class .first_day_marker to multiday
  6.  * events displaying on the *first* day for which they run.
  7.  */
  8.  
  9. if ( !defined('ABSPATH') ) { die('-1'); } ?>
  10.  
  11. <?php
  12.  
  13. global $post;
  14. $day = tribe_events_get_current_month_day();
  15. $event_id = "{$post->ID}-{$day['daynum']}";
  16. $start = tribe_get_start_date( $post, FALSE, 'U' );
  17. $end = tribe_get_end_date( $post, FALSE, 'U' );
  18.  
  19. $first_day = ( $day['date'] === date('Y-m-d', $start) );
  20. $multi_day = tribe_event_is_multiday( get_the_ID() );
  21.  
  22. ?>
  23.  
  24. <div id="tribe-events-event-<?php echo $event_id ?>" class="<?php tribe_events_event_classes() ?>">
  25.         <?php
  26.         // If this is the first day of a multiday event, add some kind of marker
  27.         // (you could alternatively add an extra CSS class)
  28.         if ( $first_day && $multi_day ) echo ' <strong> Class begins </strong> ';
  29.         ?>
  30.         <h3 class="tribe-events-month-event-title summary"><a href="<?php tribe_event_link( $post ); ?>" class="url"><?php the_title() ?></a></h3>
  31.         <div id="tribe-events-tooltip-<?php echo $event_id; ?>" class="tribe-events-tooltip">
  32.                 <h4 class="summary"><?php the_title() ?></h4>
  33.                 <div class="tribe-events-event-body">
  34.  
  35.                         <?php echo tribe_events_event_schedule_details() ?>
  36.                        
  37.                         <?php if (has_post_thumbnail() ) : ?>
  38.                                 <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90,90));?></div>
  39.                         <?php endif; ?>
  40.  
  41.                         <p class="entry-summary description">
  42.                                 <?php echo get_the_excerpt() ?>
  43.                         </p><!-- .entry-summary -->
  44.  
  45.                 </div><!-- .tribe-events-event-body -->
  46.                 <span class="tribe-events-arrow"></span>
  47.         </div><!-- .tribe-events-tooltip -->
  48. </div><!-- #tribe-events-event-# -->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top