On this page
WP_Community_Events::coordinates_match( array $a, array $b ): bool
Test if two pairs of latitude/longitude coordinates match each other.
Parameters
$aarray Required-
The first pair, with indexes
'latitude'and'longitude'. $barray Required-
The second pair, with indexes
'latitude'and'longitude'.
Return
bool True if they match, false if they don't.
Source
File: wp-admin/includes/class-wp-community-events.php. View all references
protected function coordinates_match( $a, $b ) {
if ( ! isset( $a['latitude'], $a['longitude'], $b['latitude'], $b['longitude'] ) ) {
return false;
}
return $a['latitude'] === $b['latitude'] && $a['longitude'] === $b['longitude'];
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Community_Events::get_events() wp-admin/includes/class-wp-community-events.php | Gets data about events near a particular location. |
Changelog
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_community_events/coordinates_match