Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Customized list widget template, which does *not* display event end dates.
- */
- if ( !defined('ABSPATH') ) { die('-1'); } ?>
- <li>
- <h4 class="entry-title summary">
- <a href="<?php echo tribe_get_event_link(); ?>" rel="bookmark"><?php the_title(); ?></a>
- </h4>
- <div class="duration">
- <?php
- $event_date = tribe_events_event_schedule_details();
- // Try to detect if the end time is present - this may fail if for example a filter runs on
- // tribe_events_event_schedule_details and does something funky
- $end_segment = strpos($event_date, '<span class="end-time');
- // We'll come back 2 chars from the position of the end date/time span (to catch the separator symbol, normally
- // a hyphen. Again this may need adjustment to accommodate related customizations
- if (false !== $end_segment) $event_date = substr($event_date, 0, $end_segment - 2);
- echo $event_date;
- ?>
- </div>
- <?php if ( $cost && tribe_get_cost() != '' ) { ?>
- <span class="tribe-events-divider">|</span>
- <div class="tribe-events-event-cost">
- <?php echo tribe_get_cost( null, true ); ?>
- </div>
- <?php } ?>
- <div class="vcard adr location">
- <?php if ( $venue && tribe_get_venue() != '') { ?>
- <span class="fn org tribe-venue"><?php echo tribe_get_venue_link(); ?></span>
- <?php } ?>
- <?php if ( $address && tribe_get_address() != '' ) { ?>
- <span class="street-address"><?php echo tribe_get_address(); ?></span>
- <?php } ?>
- <?php if ( $city && tribe_get_city() != '' ) { ?>
- <span class="locality"><?php echo tribe_get_city(); ?></span>
- <?php } ?>
- <?php if ( $region && tribe_get_region() !='' ) { ?>
- <span class="region"><?php echo tribe_get_region(); ?></span>
- <?php } ?>
- <?php if ( $zip && tribe_get_zip() != '' ) { ?>
- <span class="postal-code"><?php echo tribe_get_zip(); ?></span>
- <?php } ?>
- <?php if ( $country && tribe_get_country() != '') { ?>
- <span class="country-name"><?php echo tribe_get_country(); ?></span>
- <?php } ?>
- <?php if ( $organizer && tribe_get_organizer() != '' ) { ?>
- <?php _e( 'Organizer:', 'tribe-events-calendar-pro' ); ?>
- <span class="tribe-organizer"><?php echo tribe_get_organizer_link(); ?></span>
- <?php } ?>
- <?php if ( $phone && tribe_get_phone() != '' ) { ?>
- <span class="tel"><?php echo tribe_get_phone(); ?></span>
- <?php } ?>
- </div>
- </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement