Making WordPress.org

Changeset 13047


Ignore:
Timestamp:
12/11/2023 06:03:05 PM (3 years ago)
Author:
iandunn
Message:

Events: Bump SotW date to work around Core trimming events

This is a temporary hack to fix an unforseen interaction between Core and the API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/index.php

    r12973 r13047  
    15931593        $sotw = array(
    15941594                'type'                 => 'wordcamp',
    1595                 'title'                => 'State of the Word',
     1595                'title'                => 'State of the Word - Watch Now', // Remove "watch now" next year, see date note below.
    15961596                // `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.
    15971597                'url'                  => 'https://wordpress.org/state-of-the-word/?utm_source=private&utm_medium=events_widget&utm_campaign=sotw2023',
    15981598                'meetup'               => '',
    15991599                'meetup_url'           => '',
    1600                 'date'                 => '2023-12-11 15:00:00',
    1601                 'end_date'             => '2023-12-11 16:30:00',
    1602                 'start_unix_timestamp' => strtotime( '2023-12-11 15:00:00' ) - $madrid_utc_offset,
    1603                 'end_unix_timestamp'   => strtotime( '2023-12-11 16:30:00' ) - $madrid_utc_offset,
     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,
    16041610
    16051611                'location' => array(
     
    16101616                ),
    16111617        );
    1612 
    1613         if ( $current_time > $sotw['start_unix_timestamp'] ) {
    1614                 $sotw['title'] .= ' - Watch Now';
    1615         }
    16161618
    16171619        if ( $current_time > strtotime( 'December 9, 2023' ) && $current_time < strtotime( 'December 14, 2023' ) ) {
Note: See TracChangeset for help on using the changeset viewer.