WP_Community_Events::coordinates_match( array $a, array $b ): bool
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
.
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'];
}
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |