daily pastebin goal
44%
SHARE
TWEET

Custom Attendeelist.php showing custom booking form field

eventsmanager Jan 31st, 2017 346 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
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