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'.


Top ↑

Return

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


Top ↑

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
VersionDescription
4.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.