- Timestamp:
- 05/02/2017 09:33:55 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r5417 r5462 442 442 } 443 443 444 // IP:445 if ( ! $location && isset( $args['ip'] ) ) {446 $guess = guess_location_from_ip( $args['ip'] );447 448 if ( $guess ) {449 $location = array(450 'description' => $guess->ip_city,451 'latitude' => $guess->ip_latitude,452 'longitude' => $guess->ip_longitude,453 'country' => $guess->country_short,454 );455 }456 }457 458 444 /* 459 445 * If all else fails, cast a wide net and try to find something before giving up, even … … 487 473 // No specific location details. 488 474 $location = array(); 475 } 476 } 477 478 // IP: 479 if ( ! $location && isset( $args['ip'] ) ) { 480 $guess = guess_location_from_ip( $args['ip'] ); 481 482 if ( $guess ) { 483 $location = array( 484 'description' => $guess->ip_city, 485 'latitude' => $guess->ip_latitude, 486 'longitude' => $guess->ip_longitude, 487 'country' => $guess->country_short, 488 ); 489 489 } 490 490 }
Note: See TracChangeset
for help on using the changeset viewer.