WP_Community_Events::coordinates_match() WordPress Method
This method is used to check if the coordinates provided match the coordinates of the event.
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']; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |