Making WordPress.org


Ignore:
Timestamp:
04/20/2020 10:28:24 PM (6 years ago)
Author:
iandunn
Message:

Events: Apply coding standards.

File:
1 edited

Legend:

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

    r9750 r9751  
    815815                        'date'       => $event->date_utc, // TODO: DB stores a local date, not UTC.
    816816                        'end_date'   => $event->end_date,
     817
    817818                        'location'   => array(
    818819                                'location'  => $event->location,
     
    958959        return array(
    959960                // WordCamp Asia.
    960                 'asia'   => array(
    961                         'promo_start'        => strtotime( '2019-12-20 00:00:00' ),
     961                'asia' => array(
     962                        'promo_start' => strtotime( '2019-12-20 00:00:00' ),
    962963
    963964                        'regional_countries' => array_merge(
     
    968969                                array( 'RU' )
    969970                        ),
    970                         'event'              => array(
     971
     972                        'event' => array(
    971973                                'type'       => 'wordcamp',
    972974                                'title'      => 'WordCamp Asia',
     
    976978                                'date'       => '2020-02-21 00:00:00',
    977979                                'end_date'   => '2020-02-23 00:00:00',
    978                                 'location'   => array(
     980
     981                                'location' => array(
    979982                                        'location'  => 'Bangkok, Thailand',
    980983                                        'country'   => 'TH',
     
    984987                        ),
    985988                ),
     989
    986990                // WordCamp Europe.
    987991                'europe' => array(
    988                         'promo_start'        => strtotime( '2020-04-04 00:00:00' ),
     992                        'promo_start' => strtotime( '2020-04-04 00:00:00' ),
     993
    989994                        'regional_countries' => array_merge(
    990995                                get_iso_3166_2_country_codes( 'africa' ),
    991996                                get_iso_3166_2_country_codes( 'europe' )
    992997                        ),
    993                         'event'              => array(
     998
     999                        'event' => array(
    9941000                                'type'       => 'wordcamp',
    9951001                                'title'      => 'WordCamp Europe',
     
    9991005                                'date'       => '2020-06-04 00:00:00',
    10001006                                'end_date'   => '2020-06-06 00:00:00',
     1007
    10011008                                'location' => array(
    10021009                                        'location'  => 'Porto, Portugal',
     
    10071014                        ),
    10081015                ),
     1016
    10091017                // WordCamp US.
    1010                 'us'     => array(
    1011                         'promo_start'        => strtotime( '2020-08-27 00:00:00' ),
     1018                'us' => array(
     1019                        'promo_start' => strtotime( '2020-08-27 00:00:00' ),
    10121020
    10131021                        'regional_countries' => array_merge(
     
    10151023                                get_iso_3166_2_country_codes( 'north america' )
    10161024                        ),
    1017                         'event'              => array(
     1025
     1026                        'event' => array(
    10181027                                'type'       => 'wordcamp',
    10191028                                'title'      => 'WordCamp US',
     
    10241033                                'end_date'   => '2020-10-29 00:00:00',
    10251034
    1026                                 'location'   => array(
     1035                                'location' => array(
    10271036                                        'location'  => 'St. Louis, MO, USA',
    10281037                                        'country'   => 'US',
     
    11271136                        // Phase 1: Show worldwide for first two weeks.
    11281137                        $regional_wordcamps[] = $data['event'];
     1138
    11291139                } elseif ( is_within_date_range( $current_time, strtotime( '+ 2 weeks', $start ), strtotime( '+ 4 weeks', $start ) ) ) {
    11301140                        // Phase 2: Show within regional countries for next two weeks.
     
    11321142                                $regional_wordcamps[] = $data['event'];
    11331143                        }
     1144
    11341145                } elseif ( is_within_date_range( $current_time, strtotime( '+ 4 weeks', $start ), strtotime( '+ 6 weeks', $start ) ) ) {
    11351146                        // Phase 3: Show only within the event country for the last two weeks.
Note: See TracChangeset for help on using the changeset viewer.