WP_Community_Events::coordinates_match()protectedWP 4.8.0

Test if two pairs of latitude/longitude coordinates match each other.

Method of the class: WP_Community_Events{}

No Hooks.


true|false. True if they match, false if they don't.


// protected - for code of main (parent) or child class
$result = $this->coordinates_match( $a, $b );
$a(array) (required)
The first pair, with indexes 'latitude' and 'longitude'.
$b(array) (required)
The second pair, with indexes 'latitude' and 'longitude'.


Since 4.8.0 Introduced.

WP_Community_Events::coordinates_match() code WP 6.6

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'];