GC_Community_Events::coordinates_match()

最后更新于:2021-11-26 22:47:25

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

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

参数

$a

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

$b

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

响应

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

源文件

文件: gc-admin/includes/class-gc-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'];
	}