- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-community-events.php
r42016 r42343 96 96 include( ABSPATH . WPINC . '/version.php' ); 97 97 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 ); 100 100 $request_args['user-agent'] = 'WordPress/' . $wp_version . '; ' . home_url( '/' ); 101 101 … … 204 204 // Wrap the args in an array compatible with the second parameter of `wp_remote_get()`. 205 205 return array( 206 'body' => $args 206 'body' => $args, 207 207 ); 208 208 } … … 340 340 if ( isset( $location['ip'] ) ) { 341 341 $key = 'community-events-' . md5( $location['ip'] ); 342 } else 342 } elseif ( isset( $location['latitude'], $location['longitude'] ) ) { 343 343 $key = 'community-events-' . md5( $location['latitude'] . $location['longitude'] ); 344 344 } … … 464 464 } 465 465 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 ); 472 474 } 473 475 }
Note: See TracChangeset
for help on using the changeset viewer.