eventsmanager

Placeholder to display attendee form

Mar 27th, 2014
360
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * This custom placeholder will display the attendees using Attendee Form
  3. * where attendee_name is the attendee form field id
  4. */
  5. add_filter('em_event_output_placeholder','em_event_output_placeholder_attendee',1,3);
  6. function em_event_output_placeholder_attendee($replace, $EM_Event, $result){
  7.  
  8. if ( $result == '#_CUSTOMBOOKINGATTENDEES' ) {
  9. $EM_Bookings = $EM_Event->get_bookings();
  10. $replace = "";
  11. foreach( $EM_Bookings as $EM_Booking){
  12.  
  13. $attendees = $EM_Booking->booking_meta['attendees'];
  14. foreach($attendees as $key => $value) {
  15. foreach($value as $key_attendee => $value_attendee) {
  16. $replace .= $value_attendee["attendee_name"].'<br/>';
  17. }
  18. }
  19.  
  20. }
  21. }
  22.  
  23. return $replace;
  24. }
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.

×