- Timestamp:
- 12/03/2024 10:07:30 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r13165 r14230 1589 1589 */ 1590 1590 function pin_one_off_events( $events, $current_time ) { 1591 $ madrid_utc_offset = 1 * HOUR_IN_SECONDS; // Central European Standard Time - GMT+11591 $tokyo_utc_offset = 9 * HOUR_IN_SECONDS; // JST: UTC+9 1592 1592 1593 1593 $sotw = array( 1594 1594 'type' => 'wordcamp', 1595 'title' => 'State of the Word - Watch Now', // Remove "watch now" next year, see date note below.1595 'title' => 'State of the Word 2024 – Tokyo, Japan', 1596 1596 // `utm_source` is `private` because it would have to be set by the WP install, we don't need it, and tracking it could be a privacy concern. 1597 'url' => 'https://wordpress.org/state-of-the-word/?utm_source=private&utm_medium=events_widget&utm_campaign=sotw202 3',1597 'url' => 'https://wordpress.org/state-of-the-word/?utm_source=private&utm_medium=events_widget&utm_campaign=sotw2024', 1598 1598 'meetup' => '', 1599 1599 'meetup_url' => '', 1600 1601 // This year they requested the event to show up for a few days after it was over. The API does that no 1602 // problem, but in Core `WP_Community_Events::trim_events()` will remove it. This is a hack to make the 1603 // event show up, but it will probably confuse people about when it actual was, because the date will be 1604 // wrong. Don't do this again next year, only show the event in the lead up to it. The pinned News item 1605 // will still show it to people after the event. 1606 'date' => '2023-12-14 15:00:00', 1607 'end_date' => '2023-12-14 16:30:00', 1608 'start_unix_timestamp' => strtotime( '2023-12-14 15:00:00' ) - $madrid_utc_offset, 1609 'end_unix_timestamp' => strtotime( '2023-12-14 16:30:00' ) - $madrid_utc_offset, 1600 // Local time for the event location. 1601 'date' => '2024-12-16 18:00:00', 1602 'end_date' => '2024-12-16 20:00:00', 1603 // Unix timestamp (UTC). 1604 'start_unix_timestamp' => strtotime( '2024-12-16 18:00:00' ) - $tokyo_utc_offset, 1605 'end_unix_timestamp' => strtotime( '2024-12-16 20:00:00' ) - $tokyo_utc_offset, 1610 1606 1611 1607 'location' => array( 1612 1608 'location' => 'Online', 1613 'country' => ' ES',1614 'latitude' => 40.41446998218856,1615 'longitude' => -3.695042334019202,1609 'country' => 'JP', 1610 'latitude' => 35.652832, 1611 'longitude' => 139.839478, 1616 1612 ), 1617 1613 ); 1618 1614 1619 if ( $current_time > strtotime( 'December 9, 2023' ) && $current_time < strtotime( 'December 14, 2023' ) ) {1615 if ( $current_time > strtotime( 'December 11, 2024' ) && $current_time < strtotime( 'December 17, 2024' ) ) { 1620 1616 array_unshift( $events, $sotw ); 1621 1617 }
Note: See TracChangeset
for help on using the changeset viewer.