WordPress.org

Making WordPress.org

Changeset 1097


Ignore:
Timestamp:
01/07/2015 07:38:42 PM (7 years ago)
Author:
iandunn
Message:

Official WordPress Events: Simplify the check for returned meetups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php

    r1096 r1097  
    156156
    157157        $meetups = json_decode( wp_remote_retrieve_body( $response ) );
     158
    158159        if ( ! empty ( $meetups->results ) ) {
    159160            $meetups = $meetups->results;
    160         } else {
    161             $meetups = array();
    162         }
    163 
    164         if ( $meetups ) {
     161
    165162            foreach ( $meetups as $meetup ) {
    166163                $start_timestamp = ( $meetup->time / 1000 ) + ( $meetup->utc_offset / 1000 );    // convert to seconds
Note: See TracChangeset for help on using the changeset viewer.