Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * edit template file under events-manager/templates/placeholders/attendeeslist.php
- *
- * to use templates: http://wp-events-plugin.com/documentation/using-template-files/
- *
- * Then use #_ATTENDEESLIST on your single events page format
- */
- /* @var $EM_Event EM_Event */
- $people = array();
- $EM_Bookings = $EM_Event->get_bookings();
- if( count($EM_Bookings->bookings) > 0 ){
- ?>
- <ul class="event-attendees">
- <?php
- $guest_bookings = get_option('dbem_bookings_registration_disable');
- $guest_booking_user = get_option('dbem_bookings_registration_user');
- foreach( $EM_Bookings as $EM_Booking){
- if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
- $people[] = $EM_Booking->get_person()->ID;
- echo '<li>'. $EM_Booking->get_person()->get_name() .' '. $EM_Booking->output("#_BOOKINGFORMCUSTOM{field_id}") .'</li>';
- }elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
- echo '<li>'. $EM_Booking->get_person()->get_name() .' '. $EM_Booking->output("#_BOOKINGFORMCUSTOM{field_id}") .'</li>';
- }
- }
- ?>
- </ul>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement