WordPress.org

Plugin Directory

Changeset 769807


Ignore:
Timestamp:
09/10/13 17:24:06 (7 months ago)
Author:
liedekef
Message:

take 12hour format into account upon submit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • events-made-easy/trunk/extras/plugins/events-made-easy-frontend-submit/events-made-easy-frontend-submit.php

    r768221 r769807  
    199199             
    200200            if ( isset($event_data['event_start_time']) && !empty($event_data['event_start_time']) ) {  
    201                 $event_data['event_start_time'] = esc_attr( $event_data['event_start_time'] ); 
     201                $event_data['event_start_time'] = date ("H:i:00", strtotime ($event_data['event_start_time'])); 
    202202            } else { 
    203203                $event_data['event_start_time'] = '00:00'; 
     204            } 
     205             
     206            if ( isset($event_data['event_end_time']) && !empty($event_data['event_end_time']) ) {  
     207                $event_data['event_end_time'] = date ("H:i:00", strtotime ($event_data['event_end_time'])); 
     208            } else { 
     209                $event_data['event_end_time'] = $event_data['event_start_time']; 
    204210            } 
    205211             
     
    223229            if($time_start && $time_end && $time_start > $time_end){ 
    224230                $emefs_event_errors['event_time'] =  __('The event\'s end must be <strong>after</strong> the event\'s start'); 
    225             } 
    226              
    227             if ( isset($event_data['event_end_time']) && !empty($event_data['event_end_time']) ) {  
    228                 $event_data['event_end_time'] = esc_attr( $event_data['event_end_time'] ); 
    229             } else { 
    230                 $event_data['event_end_time'] = $event_data['event_start_time']; 
    231231            } 
    232232             
     
    259259             
    260260                $emefs_event_data_compiled = array_merge($emefs_event_data, $event_data); 
    261                 $emefs_event_data_compiled['event_start_time'] .= ':00'; 
    262                 $emefs_event_data_compiled['event_end_time'] .= ':00'; 
    263261                unset($emefs_event_data_compiled['action']); 
    264262                 
Note: See TracChangeset for help on using the changeset viewer.