Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This custom placeholder will display the attendees using Attendee Form
- * where attendee_name is the attendee form field id
- */
- add_filter('em_event_output_placeholder','em_event_output_placeholder_attendee',1,3);
- function em_event_output_placeholder_attendee($replace, $EM_Event, $result){
- if ( $result == '#_CUSTOMBOOKINGATTENDEES' ) {
- $EM_Bookings = $EM_Event->get_bookings();
- $replace = "";
- foreach( $EM_Bookings as $EM_Booking){
- $attendees = $EM_Booking->booking_meta['attendees'];
- foreach($attendees as $key => $value) {
- foreach($value as $key_attendee => $value_attendee) {
- $replace .= $value_attendee["attendee_name"].'<br/>';
- }
- }
- }
- }
- return $replace;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement