WP_Community_Events::coordinates_match()
Test if two pairs of latitude/longitude coordinates match each other.
Method of the class: WP_Community_Events{}
No Hooks.
Return
true|false
. True if they match, false if they don't.
Usage
// 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'.
Changelog
Since 4.8.0 | Introduced. |
WP_Community_Events::coordinates_match() WP Community Events::coordinates match code WP 6.4.3
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']; }