WP_Community_Events::coordinates_match( array $a, array $b )
Test if two pairs of latitude/longitude coordinates match each other.
Parameters
- $a
-
(array) (Required) The first pair, with indexes 'latitude' and 'longitude'.
- $b
-
(array) (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
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']; }
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_community_events/coordinates_match