BakerMan

Add "Sold Out" to title in grid view (WooTickets 3.0)

Jul 23rd, 2013
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.90 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Month Single Event
  4.  *
  5.  * Customized to add WooCommerce Tickets (WooTickets) "Sold out!" notices. Builds on a number of functions (below)
  6.  * which should already be added to functions.php if this is to work.
  7.  *
  8.  * Essentially just adds a wootickets_list_view_sold_out() call within h3.tribe-events-month-event-title.summary,
  9.  * otherwise it is untouched from the original.
  10.  *
  11.  * @uses tribe_has_wootickets()
  12.  * @see http://pastebin.com/hPS9nwft
  13.  *
  14.  * @uses get_wooticket_products()
  15.  * @see http://pastebin.com/csuqeikG
  16.  *
  17.  * @uses wootickets_list_view_sold_out()
  18.  * @see http://pastebin.com/A64F10uC
  19.  */
  20.  
  21. if ( !defined('ABSPATH') ) { die('-1'); } ?>
  22.  
  23. <?php
  24.  
  25. global $post;
  26. $day = tribe_events_get_current_month_day();
  27. $event_id = "{$post->ID}-{$day['daynum']}";
  28. $start = tribe_get_start_date( $post, FALSE, 'U' );
  29. $end = tribe_get_end_date( $post, FALSE, 'U' );
  30.  
  31. ?>
  32.  
  33. <div id="tribe-events-event-<?php echo $event_id ?>" class="<?php tribe_events_event_classes() ?>">
  34.     <h3 class="tribe-events-month-event-title summary">
  35.         <a href="<?php tribe_event_link( $post ); ?>" class="url">
  36.             <?php the_title() ?>
  37.         </a>
  38.         <?php wootickets_list_view_sold_out() ?>
  39.     </h3>
  40.     </h3>
  41.     <div id="tribe-events-tooltip-<?php echo $event_id; ?>" class="tribe-events-tooltip">
  42.         <h4 class="summary"><?php the_title() ?> <?php echo wootickets_list_view_sold_out() ?> </h4>
  43.         <div class="tribe-events-event-body">
  44.  
  45.             <?php echo tribe_events_event_schedule_details() ?>
  46.            
  47.             <?php if (has_post_thumbnail() ) : ?>
  48.                 <div class="tribe-events-event-thumb"><?php echo the_post_thumbnail(array(90,90));?></div>
  49.             <?php endif; ?>
  50.  
  51.             <p class="entry-summary description">
  52.                 <?php echo get_the_excerpt() ?>
  53.             </p><!-- .entry-summary -->
  54.  
  55.         </div><!-- .tribe-events-event-body -->
  56.         <span class="tribe-events-arrow"></span>
  57.     </div><!-- .tribe-events-tooltip -->
  58. </div><!-- #tribe-events-event-# -->
Advertisement
Add Comment
Please, Sign In to add comment