Making WordPress.org

Changeset 12973


Ignore:
Timestamp:
11/20/2023 06:13:15 PM (3 years ago)
Author:
iandunn
Message:

Events: Link to new SotW landing page, add Watch Now after start

File:
1 edited

Legend:

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

    r12962 r12973  
    15891589 */
    15901590function pin_one_off_events( $events, $current_time ) {
     1591        $madrid_utc_offset = 1 * HOUR_IN_SECONDS; // Central European Standard Time - GMT+1
     1592
     1593        $sotw = array(
     1594                'type'                 => 'wordcamp',
     1595                'title'                => 'State of the Word',
     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=sotw2023',
     1598                'meetup'               => '',
     1599                '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,
     1604
     1605                'location' => array(
     1606                        'location'  => 'Online',
     1607                        'country'   => 'ES',
     1608                        'latitude'  => 40.41446998218856,
     1609                        'longitude' => -3.695042334019202,
     1610                ),
     1611        );
     1612
     1613        if ( $current_time > $sotw['start_unix_timestamp'] ) {
     1614                $sotw['title'] .= ' - Watch Now';
     1615        }
     1616
    15911617        if ( $current_time > strtotime( 'December 9, 2023' ) && $current_time < strtotime( 'December 14, 2023' ) ) {
    1592                 $utc_offset = 1 * HOUR_IN_SECONDS;
    1593 
    1594                 $sotw = array(
    1595                         'type'                 => 'wordcamp',
    1596                         'title'                => 'State of the Word',
    1597                         // `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.
    1598                         // This may need to be updated for GA4 - https://support.google.com/analytics/answer/10089681.
    1599                         'url'                  => 'https://wordpress.org/news/2023/10/state-of-the-word-2023/?utm_source=private&utm_medium=events_widget&utm_campaign=sotw2023',
    1600                         'meetup'               => '',
    1601                         'meetup_url'           => '',
    1602                         'date'                 => '2023-12-11 15:00:00',
    1603                         'end_date'             => '2023-12-11 16:30:00',
    1604                         'start_unix_timestamp' => strtotime( '2023-12-11 15:00:00' ) - $utc_offset,
    1605                         'end_unix_timestamp'   => strtotime( '2023-12-11 16:30:00' ) - $utc_offset,
    1606 
    1607                         'location' => array(
    1608                                 'location'  => 'Online',
    1609                                 'country'   => 'ES',
    1610                                 'latitude'  => 40.41446998218856,
    1611                                 'longitude' => -3.695042334019202,
    1612                         ),
    1613                 );
    1614 
    16151618                array_unshift( $events, $sotw );
    16161619        }
Note: See TracChangeset for help on using the changeset viewer.