Skip to content

Commit

Permalink
Events: Set date_utc for city landing pages
Browse files Browse the repository at this point in the history
The return value of `get_city_landing_page_events()` started being passed through `Google_Map\prepare_events()` with WordPress/wporg-mu-plugins@ebfc71a. Because of that, the event needs to be an object, and it needs to set `date_utc` rather than `timestamp`.
  • Loading branch information
iandunn committed Jan 10, 2024
1 parent 2a4a44b commit 3a7cccd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function get_city_landing_page_events( string $request_uri ): array {
continue;
}

$events[] = array(
$events[] = (object) array(
'id' => $wordcamp->_site_id,
'title' => get_wordcamp_name( $wordcamp->_site_id ),
'url' => $wordcamp->{'URL'},
Expand All @@ -181,7 +181,7 @@ function get_city_landing_page_events( string $request_uri ): array {
'location' => $wordcamp->{'Location'},
'latitude' => $coordinates['latitude'],
'longitude' => $coordinates['longitude'],
'timestamp' => $wordcamp->{'Start Date (YYYY-mm-dd)'},
'date_utc' => gmdate( 'Y-m-d H:i:s', $wordcamp->{'Start Date (YYYY-mm-dd)'} ),
'tz_offset' => get_wordcamp_offset( $wordcamp ),
);
}
Expand Down

0 comments on commit 3a7cccd

Please sign in to comment.