WP_Community_Events::coordinates_match

Advertisement

Summery Summery

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

Syntax Syntax

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

Parameters Parameters

$a

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

$b

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

Return Return

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.8.0 Introduced.

Advertisement

Leave a Reply