Changeset 12667
- Timestamp:
- 06/20/2023 10:24:08 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-events-online.php
r9787 r12667 39 39 // The `date_utc` is not actually a UTC timestamp, it's the local time as Y-m-d H:i:s. 40 40 // We need to convert it back to UTC by subtracting the UTC offset. 41 $timestamp = strtotime( $event->date_utc ) - $event->date_utc_offset;41 $timestamp = strtotime( $event->date_utc ) - $event->date_utc_offset; 42 42 $cached_events[] = array( 43 43 'title' => $event->title, … … 46 46 ); 47 47 } 48 49 // As the original data was sorted by local time (`date_utc`), 50 // we need to reorder the events after it's converted back to UTC. 51 usort( 52 $cached_events, 53 function( $a, $b ) { 54 return $a['start_timestamp'] <=> $b['start_timestamp']; 55 } 56 ); 48 57 49 58 return $cached_events; … … 84 93 */ 85 94 function render_online_templates() { 86 require_once ( __DIR__ . '/template-events-online.php' );95 require_once __DIR__ . '/template-events-online.php'; 87 96 } 88 97
Note: See TracChangeset
for help on using the changeset viewer.