eventsmanager

Custom Attendeelist.php showing custom booking form field

Jan 31st, 2017
536
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /* @var $EM_Event EM_Event */
  3. $people = array();
  4. $EM_Bookings = $EM_Event->get_bookings();
  5. if( count($EM_Bookings->bookings) > 0 ){
  6. ?>
  7. <ul class="event-attendees">
  8. <?php
  9. $guest_bookings = get_option('dbem_bookings_registration_disable');
  10. $guest_booking_user = get_option('dbem_bookings_registration_user');
  11. foreach( $EM_Bookings as $EM_Booking){
  12. if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
  13. $people[] = $EM_Booking->get_person()->ID;
  14. echo '<li>'. $EM_Booking->get_person()->get_name() .' '. $EM_Booking->output("#_BOOKINGFORMCUSTOM{field_id}") .'</li>';
  15. }elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
  16. echo '<li>'. $EM_Booking->get_person()->get_name() .' '. $EM_Booking->output("#_BOOKINGFORMCUSTOM{field_id}") .'</li>';
  17. }
  18. }
  19. ?>
  20. </ul>
  21. <?php
  22. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×