Make WordPress Core

Changeset 49147


Ignore:
Timestamp:
10/14/2020 06:20:40 PM (6 years ago)
Author:
iandunn
Message:

Community Events: Apply coding standards.

The previous commits intentionally didn't include these, because it would have added an unreasonable amount of diff noise.

See #51130

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r49146 r49147  
    17551755                'communityEventsData',
    17561756                array(
    1757                         'nonce' => wp_create_nonce( 'community_events' ),
    1758                         'cache' => $events_client->get_cached_events(),
     1757                        'nonce'       => wp_create_nonce( 'community_events' ),
     1758                        'cache'       => $events_client->get_cached_events(),
    17591759                        'time_format' => get_option( 'time_format' ),
    17601760
    1761                         'l10n'  => array(
     1761                        'l10n'        => array(
    17621762                                'enter_closest_city'              => __( 'Enter your closest city to find nearby events.' ),
    17631763                                'error_occurred_please_try_again' => __( 'An error occurred. Please try again.' ),
  • trunk/tests/phpunit/tests/admin/includesCommunityEvents.php

    r49145 r49147  
    338338        public function _events_with_unpinned_wordcamp() {
    339339                return array(
    340                                                 array(
    341                                                         'type'       => 'meetup',
    342                                                         'title'      => 'Flexbox + CSS Grid: Magic for Responsive Layouts',
    343                                                         'url'        => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/',
    344                                                         'meetup'     => 'The East Bay WordPress Meetup Group',
    345                                                         'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/',
    346                                                         'start_unix_timestamp' => strtotime( 'next Monday 1pm' ),
    347                                                         'end_unix_timestamp'   => strtotime( 'next Monday 2pm' ),
    348 
    349                                                         'location'   => array(
    350                                                                 'location'  => 'Oakland, CA, USA',
    351                                                                 'country'   => 'us',
    352                                                                 'latitude'  => 37.808453,
    353                                                                 'longitude' => -122.26593,
    354                                                         ),
    355                                                 ),
    356                                                 array(
    357                                                         'type'       => 'meetup',
    358                                                         'title'      => 'Part 3- Site Maintenance - Tools to Make It Easy',
    359                                                         'url'        => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/',
    360                                                         'meetup'     => 'WordPress Bay Area Foothills Group',
    361                                                         'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/',
    362                                                         'start_unix_timestamp' => strtotime( 'next Tuesday 1:30pm' ),
    363                                                         'end_unix_timestamp'   => strtotime( 'next Tuesday 2:30pm' ),
    364 
    365                                                         'location'   => array(
    366                                                                 'location'  => 'Milpitas, CA, USA',
    367                                                                 'country'   => 'us',
    368                                                                 'latitude'  => 37.432813,
    369                                                                 'longitude' => -121.907095,
    370                                                         ),
    371                                                 ),
    372                                                 array(
    373                                                         'type'       => 'meetup',
    374                                                         'title'      => 'WordPress Q&A',
    375                                                         'url'        => 'https://www.meetup.com/sanjosewp/events/245419844/',
    376                                                         'meetup'     => 'The San Jose WordPress Meetup',
    377                                                         'meetup_url' => 'https://www.meetup.com/sanjosewp/',
    378                                                         'start_unix_timestamp' => strtotime( 'next Wednesday 5:30pm' ),
    379                                                         'end_unix_timestamp'   => strtotime( 'next Wednesday 6:30pm' ),
    380 
    381                                                         'location'   => array(
    382                                                                 'location'  => 'Milpitas, CA, USA',
    383                                                                 'country'   => 'us',
    384                                                                 'latitude'  => 37.244194,
    385                                                                 'longitude' => -121.889313,
    386                                                         ),
    387                                                 ),
    388                                                 array(
    389                                                         'type'       => 'wordcamp',
    390                                                         'title'      => 'WordCamp San Diego',
    391                                                         'url'        => 'https://2018.sandiego.wordcamp.org',
    392                                                         'meetup'     => null,
    393                                                         'meetup_url' => null,
    394                                                         'start_unix_timestamp' => strtotime( 'next Thursday 9am' ),
    395                                                         'end_unix_timestamp'   => strtotime( 'next Thursday 10am' ),
    396 
    397                                                         'location'   => array(
    398                                                                 'location'  => 'San Diego, CA',
    399                                                                 'country'   => 'US',
    400                                                                 'latitude'  => 32.7220419,
    401                                                                 'longitude' => -117.1534513,
    402                                                         ),
    403                                                 ),
     340                        array(
     341                                'type'                 => 'meetup',
     342                                'title'                => 'Flexbox + CSS Grid: Magic for Responsive Layouts',
     343                                'url'                  => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/',
     344                                'meetup'               => 'The East Bay WordPress Meetup Group',
     345                                'meetup_url'           => 'https://www.meetup.com/Eastbay-WordPress-Meetup/',
     346                                'start_unix_timestamp' => strtotime( 'next Monday 1pm' ),
     347                                'end_unix_timestamp'   => strtotime( 'next Monday 2pm' ),
     348
     349                                'location'             => array(
     350                                        'location'  => 'Oakland, CA, USA',
     351                                        'country'   => 'us',
     352                                        'latitude'  => 37.808453,
     353                                        'longitude' => -122.26593,
     354                                ),
     355                        ),
     356
     357                        array(
     358                                'type'                 => 'meetup',
     359                                'title'                => 'Part 3- Site Maintenance - Tools to Make It Easy',
     360                                'url'                  => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/',
     361                                'meetup'               => 'WordPress Bay Area Foothills Group',
     362                                'meetup_url'           => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/',
     363                                'start_unix_timestamp' => strtotime( 'next Tuesday 1:30pm' ),
     364                                'end_unix_timestamp'   => strtotime( 'next Tuesday 2:30pm' ),
     365
     366                                'location'             => array(
     367                                        'location'  => 'Milpitas, CA, USA',
     368                                        'country'   => 'us',
     369                                        'latitude'  => 37.432813,
     370                                        'longitude' => -121.907095,
     371                                ),
     372                        ),
     373
     374                        array(
     375                                'type'                 => 'meetup',
     376                                'title'                => 'WordPress Q&A',
     377                                'url'                  => 'https://www.meetup.com/sanjosewp/events/245419844/',
     378                                'meetup'               => 'The San Jose WordPress Meetup',
     379                                'meetup_url'           => 'https://www.meetup.com/sanjosewp/',
     380                                'start_unix_timestamp' => strtotime( 'next Wednesday 5:30pm' ),
     381                                'end_unix_timestamp'   => strtotime( 'next Wednesday 6:30pm' ),
     382
     383                                'location'             => array(
     384                                        'location'  => 'Milpitas, CA, USA',
     385                                        'country'   => 'us',
     386                                        'latitude'  => 37.244194,
     387                                        'longitude' => -121.889313,
     388                                ),
     389                        ),
     390
     391                        array(
     392                                'type'                 => 'wordcamp',
     393                                'title'                => 'WordCamp San Diego',
     394                                'url'                  => 'https://2018.sandiego.wordcamp.org',
     395                                'meetup'               => null,
     396                                'meetup_url'           => null,
     397                                'start_unix_timestamp' => strtotime( 'next Thursday 9am' ),
     398                                'end_unix_timestamp'   => strtotime( 'next Thursday 10am' ),
     399
     400                                'location'             => array(
     401                                        'location'  => 'San Diego, CA',
     402                                        'country'   => 'US',
     403                                        'latitude'  => 32.7220419,
     404                                        'longitude' => -117.1534513,
     405                                ),
     406                        ),
    404407                );
    405408        }
     
    441444        public function _events_with_multiple_wordcamps() {
    442445                return array(
    443                                                 array(
    444                                                         'type'       => 'meetup',
    445                                                         'title'      => 'Flexbox + CSS Grid: Magic for Responsive Layouts',
    446                                                         'url'        => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/',
    447                                                         'meetup'     => 'The East Bay WordPress Meetup Group',
    448                                                         'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/',
    449                                                         'start_unix_timestamp' => strtotime( '2 days ago' ) - HOUR_IN_SECONDS,
    450                                                         'end_unix_timestamp'   => strtotime( '2 days ago' ),
    451 
    452                                                         'location'   => array(
    453                                                                 'location'  => 'Oakland, CA, USA',
    454                                                                 'country'   => 'us',
    455                                                                 'latitude'  => 37.808453,
    456                                                                 'longitude' => -122.26593,
    457                                                         ),
    458                                                 ),
    459 
    460                                                 array(
    461                                                         'type'       => 'wordcamp',
    462                                                         'title'      => 'WordCamp San Diego',
    463                                                         'url'        => 'https://2018.sandiego.wordcamp.org',
    464                                                         'meetup'     => null,
    465                                                         'meetup_url' => null,
    466                                                         'start_unix_timestamp' => strtotime( 'next Tuesday 9am' ),
    467                                                         'end_unix_timestamp'   => strtotime( 'next Tuesday 10am' ),
    468 
    469                                                         'location'   => array(
    470                                                                 'location'  => 'San Diego, CA',
    471                                                                 'country'   => 'US',
    472                                                                 'latitude'  => 32.7220419,
    473                                                                 'longitude' => -117.1534513,
    474                                                         ),
    475                                                 ),
    476 
    477                                                 array(
    478                                                         'type'       => 'meetup',
    479                                                         'title'      => 'Part 3- Site Maintenance - Tools to Make It Easy',
    480                                                         'url'        => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/',
    481                                                         'meetup'     => 'WordPress Bay Area Foothills Group',
    482                                                         'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/',
    483                                                         'start_unix_timestamp' => strtotime( 'next Wednesday 1:30pm' ),
    484                                                         'end_unix_timestamp'   => strtotime( 'next Wednesday 2:30pm' ),
    485 
    486                                                         'location'   => array(
    487                                                                 'location'  => 'Milpitas, CA, USA',
    488                                                                 'country'   => 'us',
    489                                                                 'latitude'  => 37.432813,
    490                                                                 'longitude' => -121.907095,
    491                                                         ),
    492                                                 ),
    493 
    494                                                 array(
    495                                                         'type'       => 'meetup',
    496                                                         'title'      => 'WordPress Q&A',
    497                                                         'url'        => 'https://www.meetup.com/sanjosewp/events/245419844/',
    498                                                         'meetup'     => 'The San Jose WordPress Meetup',
    499                                                         'meetup_url' => 'https://www.meetup.com/sanjosewp/',
    500                                                         'start_unix_timestamp' => strtotime( 'next Thursday 5:30pm' ),
    501                                                         'end_unix_timestamp'   => strtotime( 'next Thursday 6:30pm' ),
    502 
    503                                                         'location'   => array(
    504                                                                 'location'  => 'Milpitas, CA, USA',
    505                                                                 'country'   => 'us',
    506                                                                 'latitude'  => 37.244194,
    507                                                                 'longitude' => -121.889313,
    508                                                         ),
    509                                                 ),
    510 
    511                                                 array(
    512                                                         'type'       => 'wordcamp',
    513                                                         'title'      => 'WordCamp Los Angeles',
    514                                                         'url'        => 'https://2018.la.wordcamp.org',
    515                                                         'meetup'     => null,
    516                                                         'meetup_url' => null,
    517                                                         'start_unix_timestamp' => strtotime( 'next Friday 9am' ),
    518                                                         'end_unix_timestamp'   => strtotime( 'next Friday 10am' ),
    519 
    520                                                         'location'   => array(
    521                                                                 'location'  => 'Los Angeles, CA',
    522                                                                 'country'   => 'US',
    523                                                                 'latitude'  => 34.050888,
    524                                                                 'longitude' => -118.285426,
    525                                                         ),
    526                                                 ),
     446                        array(
     447                                'type'                 => 'meetup',
     448                                'title'                => 'Flexbox + CSS Grid: Magic for Responsive Layouts',
     449                                'url'                  => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/',
     450                                'meetup'               => 'The East Bay WordPress Meetup Group',
     451                                'meetup_url'          => 'https://www.meetup.com/Eastbay-WordPress-Meetup/',
     452                                'start_unix_timestamp' => strtotime( '2 days ago' ) - HOUR_IN_SECONDS,
     453                                'end_unix_timestamp'   => strtotime( '2 days ago' ),
     454
     455                                'location'             => array(
     456                                        'location'  => 'Oakland, CA, USA',
     457                                        'country'   => 'us',
     458                                        'latitude'  => 37.808453,
     459                                        'longitude' => -122.26593,
     460                                ),
     461                        ),
     462
     463                        array(
     464                                'type'                 => 'wordcamp',
     465                                'title'                => 'WordCamp San Diego',
     466                                'url'                  => 'https://2018.sandiego.wordcamp.org',
     467                                'meetup'               => null,
     468                                'meetup_url'          => null,
     469                                'start_unix_timestamp' => strtotime( 'next Tuesday 9am' ),
     470                                'end_unix_timestamp'   => strtotime( 'next Tuesday 10am' ),
     471
     472                                'location'             => array(
     473                                        'location'  => 'San Diego, CA',
     474                                        'country'   => 'US',
     475                                        'latitude'  => 32.7220419,
     476                                        'longitude' => -117.1534513,
     477                                ),
     478                        ),
     479
     480                        array(
     481                                'type'                 => 'meetup',
     482                                'title'                => 'Part 3- Site Maintenance - Tools to Make It Easy',
     483                                'url'                  => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/',
     484                                'meetup'               => 'WordPress Bay Area Foothills Group',
     485                                'meetup_url'          => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/',
     486                                'start_unix_timestamp' => strtotime( 'next Wednesday 1:30pm' ),
     487                                'end_unix_timestamp'   => strtotime( 'next Wednesday 2:30pm' ),
     488
     489                                'location'             => array(
     490                                        'location'  => 'Milpitas, CA, USA',
     491                                        'country'   => 'us',
     492                                        'latitude'  => 37.432813,
     493                                        'longitude' => -121.907095,
     494                                ),
     495                        ),
     496
     497                        array(
     498                                'type'                 => 'meetup',
     499                                'title'                => 'WordPress Q&A',
     500                                'url'                  => 'https://www.meetup.com/sanjosewp/events/245419844/',
     501                                'meetup'               => 'The San Jose WordPress Meetup',
     502                                'meetup_url'          => 'https://www.meetup.com/sanjosewp/',
     503                                'start_unix_timestamp' => strtotime( 'next Thursday 5:30pm' ),
     504                                'end_unix_timestamp'   => strtotime( 'next Thursday 6:30pm' ),
     505
     506                                'location'             => array(
     507                                        'location'  => 'Milpitas, CA, USA',
     508                                        'country'   => 'us',
     509                                        'latitude'  => 37.244194,
     510                                        'longitude' => -121.889313,
     511                                ),
     512                        ),
     513
     514                        array(
     515                                'type'                 => 'wordcamp',
     516                                'title'                => 'WordCamp Los Angeles',
     517                                'url'                  => 'https://2018.la.wordcamp.org',
     518                                'meetup'               => null,
     519                                'meetup_url'          => null,
     520                                'start_unix_timestamp' => strtotime( 'next Friday 9am' ),
     521                                'end_unix_timestamp'   => strtotime( 'next Friday 10am' ),
     522
     523                                'location'             => array(
     524                                        'location'  => 'Los Angeles, CA',
     525                                        'country'   => 'US',
     526                                        'latitude'  => 34.050888,
     527                                        'longitude' => -118.285426,
     528                                ),
     529                        ),
    527530                );
    528531        }
Note: See TracChangeset for help on using the changeset viewer.