SHARE
TWEET

Display list of all events tickets

eventsmanager Mar 16th, 2016 349 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  This placeholder will list the events tickets
  3.  */
  4. function my_em_ticket_list($replacement, $EM_Event, $result){
  5.     switch( $result ){
  6.         case '#_EVENTTICKETSLIST':
  7.             $replacement = '<ul>';
  8.             foreach( $EM_Event->get_tickets()->tickets as $EM_Ticket ){
  9.                 $replacement .= '<li>'.$EM_Ticket->ticket_name.': '.$EM_Ticket->ticket_description.'</li>';
  10.             }
  11.             $replacement .= '</ul>';
  12.             break;
  13.     }
  14.     return $replacement;   
  15. }
  16. add_filter('em_event_output_placeholder','my_em_ticket_list',1,3);
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