Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-community-events.php

    r42016 r42343  
    9696        include( ABSPATH . WPINC . '/version.php' );
    9797
    98         $api_url      = 'http://api.wordpress.org/events/1.0/';
    99         $request_args = $this->get_request_args( $location_search, $timezone );
     98        $api_url                    = 'http://api.wordpress.org/events/1.0/';
     99        $request_args               = $this->get_request_args( $location_search, $timezone );
    100100        $request_args['user-agent'] = 'WordPress/' . $wp_version . '; ' . home_url( '/' );
    101101
     
    204204        // Wrap the args in an array compatible with the second parameter of `wp_remote_get()`.
    205205        return array(
    206             'body' => $args
     206            'body' => $args,
    207207        );
    208208    }
     
    340340        if ( isset( $location['ip'] ) ) {
    341341            $key = 'community-events-' . md5( $location['ip'] );
    342         } else if ( isset( $location['latitude'], $location['longitude'] ) ) {
     342        } elseif ( isset( $location['latitude'], $location['longitude'] ) ) {
    343343            $key = 'community-events-' . md5( $location['latitude'] . $location['longitude'] );
    344344        }
     
    464464        }
    465465
    466         error_log( sprintf(
    467             '%s: %s. Details: %s',
    468             __METHOD__,
    469             trim( $message, '.' ),
    470             wp_json_encode( $details )
    471         ) );
     466        error_log(
     467            sprintf(
     468                '%s: %s. Details: %s',
     469                __METHOD__,
     470                trim( $message, '.' ),
     471                wp_json_encode( $details )
     472            )
     473        );
    472474    }
    473475}
Note: See TracChangeset for help on using the changeset viewer.