Making WordPress.org

Changeset 10518


Ignore:
Timestamp:
12/15/2020 06:24:56 PM (4 years ago)
Author:
iandunn
Message:

Events: Bump the COVID-19 impact expiration to June 2021.

See https://wordpress.slack.com/archives/C037W5S7X/p1607096717134300

Location:
sites/trunk/api.wordpress.org/public_html/events/1.0
Files:
2 edited

Legend:

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

    r10475 r10518  
    3838    defined( 'WEEK_IN_SECONDS' ) or define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS );
    3939
     40    /*
     41     * Increase range during COVID-19 to mitigate event deserts.
     42     *
     43     * This is just a guess, and needs to be re-evaluated before it expires.
     44     */
     45    define( 'COVID_IMPACT_EXPIRATION', strtotime( 'June 30 2021' ) );
     46
    4047    // The test suite just needs the functions defined and doesn't want any headers or output
    4148    if ( defined( 'RUNNING_TESTS' ) && RUNNING_TESTS ) {
     
    769776    );
    770777
    771     /*
    772      * Increase range during COVID-19 to mitigate event deserts.
    773      *
    774      * See https://make.wordpress.org/core/2020/04/02/showing-online-wordcamps-in-the-events-widget/#comment-38480
    775      */
    776     if ( time() < strtotime( 'December 31 2020' ) ) {
     778    if ( time() < COVID_IMPACT_EXPIRATION ) {
    777779        $event_distances['wordcamp'] = 600;
    778780    }
     
    13531355    global $wpdb, $cache_group, $cache_life;
    13541356
    1355     // Re-evaluate pinning after July, per https://make.wordpress.org/core/2020/04/02/showing-online-wordcamps-in-the-events-widget/#comment-38480.
    1356     if ( $current_time >= strtotime( 'December 31 2020' ) ) {
     1357    if ( $current_time >= COVID_IMPACT_EXPIRATION ) {
    13571358        return $events;
    13581359    }
  • sites/trunk/api.wordpress.org/public_html/events/1.0/tests/test-index.php

    r10475 r10518  
    836836            'input' => array( 'ip' => '80.95.186.144' ),
    837837            'expected' => array(
    838                 'description' => 'antrim',
    839                 'latitude'    => '54.700',
    840                 'longitude'   => '-6.200',
     838                'description' => 'belfast',
     839                'latitude'    => '54.583',
     840                'longitude'   => '-5.933',
    841841                'country'     => 'GB',
    842842                'internal'    => true,
Note: See TracChangeset for help on using the changeset viewer.