WP_Community_Events::coordinates_match() protected WP 4.8.0
Test if two pairs of latitude/longitude coordinates match each other.
{} Это метод класса: WP_Community_Events{}
Хуков нет.
Возвращает
true/false. True if they match, false if they don't.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->coordinates_match( $a, $b );
- $a(массив) (обязательный)
- The first pair, with indexes 'latitude' and 'longitude'.
- $b(массив) (обязательный)
- The second pair, with indexes 'latitude' and 'longitude'.
Список изменений
С версии 4.8.0 | Введена. |
Код WP_Community_Events::coordinates_match() WP Community Events::coordinates match WP 5.6.2
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'];
}