Ejemplo n.º 1
0
 /**
  * Return an event's time.
  *
  * @return string Event time.
  */
 function eventbrite_event_time()
 {
     // Determine if the end time needs the date included (in the case of multi-day events).
     $end_time = eventbrite_is_multiday_event() ? mysql2date('F j Y, g:i A', eventbrite_event_end()->local) : mysql2date('g:i A', eventbrite_event_end()->local);
     // Assemble the full event time string.
     $event_time = sprintf(_x('%1$s - %2$s', 'Event date and time. %1$s = start time, %2$s = end time', 'eventbrite_api'), esc_html(mysql2date('F j Y, g:i A', eventbrite_event_start()->local)), esc_html($end_time));
     return $event_time;
 }
Ejemplo n.º 2
0
 /**
  * Return an event's time.
  *
  * @return string Event time.
  */
 function eventbrite_event_time()
 {
     // Collect our formats from the admin.
     $date_format = get_option('date_format');
     $time_format = get_option('time_format');
     $combined_format = apply_filters('eventbrite_date_time_format', $date_format . ', ' . $time_format, $date_format, $time_format);
     // Determine if the end time needs the date included (in the case of multi-day events).
     $end_time = eventbrite_is_multiday_event() ? mysql2date($combined_format, eventbrite_event_end()->local) : mysql2date($time_format, eventbrite_event_end()->local);
     // Assemble the full event time string.
     $event_time = sprintf(_x('%1$s - %2$s', 'Event date and time. %1$s = start time, %2$s = end time', 'eventbrite_api'), esc_html(mysql2date($combined_format, eventbrite_event_start()->local)), esc_html($end_time));
     return $event_time;
 }