tribe_get_venue( int $postId = null )
Returns the event venue name
Contents
Parameters
- $postId
-
(int) (Optional) Either event id or venue id, if none specified, current post is used.
Default value: null
Return
(string) Venue Name
Source
File: src/functions/template-tags/venue.php
function tribe_get_venue( $postId = null ) {
$venue_id = tribe_get_venue_id( $postId );
$venue = ( $venue_id > 0 ) ? esc_html( get_the_title( $venue_id ) ) : null;
/**
* Allows customization of the retrieved venue name for a specified event.
*
* @since ??
* @since 4.5.12 Added docblock and venue ID to filter.
*
* @param string $venue The name of the retrieved venue.
* @param int $venue_id The venue ID.
*/
return apply_filters( 'tribe_get_venue', $venue, $venue_id );
}
Changelog
| Version | Description |
|---|---|
| ?? | Introduced. |