Tribe__Events__Pro__iCal::find_location( $item )

Get the LOCATION value from the $item


Parameters

$item

(Required) array The item where to look for the LOCATION value.


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/iCal.php

	public function find_location( $item ) {
		$results = array_map(
			function ( $row ) {
				return str_replace( 'LOCATION:', '', $row );
			},
			array_filter(
				$item,
				function ( $row ) {
					return strpos( $row, 'LOCATION:' ) !== false;
				}
			)
		);

		$location = reset( $results );
		return empty( $location ) ? '' : $location;
	}

Top ↑

Changelog

Changelog
Version Description
4.7.5 Introduced.