Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('em_location_output_placeholder','my_em_placeholder_mod',1,3);
- function my_em_placeholder_mod($replace, $EM_Location, $result){
- switch( $result ){
- case '#_LOCATIONNEXTEVENTS':
- $events = EM_Events::get( array('location'=>$EM_Location->location_id, 'category'=>'-77', 'scope'=>'future', 'limit'=>3) );
- if ( count($events) > 0 ){
- $replace = get_option('dbem_location_event_list_item_header_format');
- foreach($events as $event){
- $replace .= $event->output(get_option('dbem_location_event_list_item_format'));
- }
- $replace .= get_option('dbem_location_event_list_item_footer_format');
- } else {
- $replace = get_option('dbem_location_no_events_message');
- }
- break;
- }
- return $replace;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement