tribe_address_exists( int $postId = null )
Returns true if any of the following exist: address, city, state/province (region), country or zip
Contents
Parameters
- $postId
-
(int) (Optional) Either event id or venue id, if none specified, current post is used.
Default value: null
Return
(bool) True if any part of an address exists.
Source
File: src/functions/template-tags/venue.php
function tribe_address_exists( $postId = null ) {
if (
tribe_get_address( $postId ) ||
tribe_get_city( $postId ) ||
tribe_get_region( $postId ) ||
tribe_get_country( $postId ) ||
tribe_get_zip( $postId ) ||
( tribe_is_venue_overwrite( $postId ) && tribe_get_coordinates( $postId ) )
) {
return true;
} else {
return false;
}
}
Changelog
| Version | Description |
|---|---|
| ?? | Introduced. |