Advertisement
eventsmanager

#_EVENTTIMES quick fix

Apr 5th, 2013
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. add_filter('em_event_output_placeholder','my_em_placeholder_mod',1,3);
  2. function my_em_placeholder_mod($replace, $EM_Event, $result){
  3. if ( $result == '#_EVENTTIMES' ) {
  4. if( !$EM_Event->event_all_day ){
  5. $time_format = ( get_option('dbem_time_format') ) ? get_option('dbem_time_format'):get_option('time_format');
  6. if($EM_Event->event_start_time != $EM_Event->event_end_time ){
  7. $replace = date_i18n($time_format, $EM_Event->start). get_option('dbem_times_Separator') . date_i18n($time_format, $EM_Event->end);
  8. }else{
  9. $replace = date_i18n($time_format, $this->start);
  10. }
  11. }else{
  12. $replace = get_option('dbem_event_all_day_message');
  13. }
  14. }
  15. return $replace;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement