Advertisement
eventsmanager

custom #_EVENTDATES

Jul 25th, 2013
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. add_filter('em_event_output_placeholder','my_em_placeholder_mod_eventdates',1,3);
  2. function my_em_placeholder_mod_eventdates($replace, $EM_Event, $result){
  3. if ( $result == '#_EVENTDATES' ) {
  4. if( $EM_Event->event_start_date != $EM_Event->event_end_date){
  5. $replace = date_i18n('d M Y', $EM_Event->start).' - '. date_i18n('d M Y', $EM_Event->end);
  6. }else{
  7. $replace = date_i18n('d M Y', $EM_Event->start);
  8. }
  9. }
  10. return $replace;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement