WP_Community_Events::coordinates_match( array $a, array $b )

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

Parameters Parameters


(array) (Required) The first pair, with indexes 'latitude' and 'longitude'.


(array) (Required) The second pair, with indexes 'latitude' and 'longitude'.

Top ↑

Return Return

(bool) True if they match, false if they don't.

Top ↑

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

Top ↑

Changelog Changelog

Version Description
4.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.