Tribe__Events__Main::fullAddressString( $postId = null )

Returns a string version of the full address of an event


Parameters

(int|WP_Post) (Required) The post object or post id.


Top ↑

Return

(string) The event's address.


Top ↑

Source

File: src/Tribe/Main.php

		public function fullAddressString( $postId = null ) {
			$address = '';
			if ( tribe_get_venue( $postId ) ) {
				$address .= tribe_get_venue( $postId );
			}

			if ( tribe_get_address( $postId ) ) {
				if ( $address != '' ) {
					$address .= ', ';
				}
				$address .= tribe_get_address( $postId );
			}

			if ( tribe_get_city( $postId ) ) {
				if ( $address != '' ) {
					$address .= ', ';
				}
				$address .= tribe_get_city( $postId );
			}

			if ( tribe_get_region( $postId ) ) {
				if ( $address != '' ) {
					$address .= ', ';
				}
				$address .= tribe_get_region( $postId );
			}

			if ( tribe_get_zip( $postId ) ) {
				if ( $address != '' ) {
					$address .= ', ';
				}
				$address .= tribe_get_zip( $postId );
			}

			if ( tribe_get_country( $postId ) ) {
				if ( $address != '' ) {
					$address .= ', ';
				}
				$address .= tribe_get_country( $postId );
			}

			return $address;
		}