Tribe__Events__Validator__Base::is_venue_id_list( string|array $venues, string $sep = ',' )

Whether a list or array of venue post IDs only contains valid venue IDs or not.


Parameters

$venues

(string|array) (Required) A list of venue post IDs separated by the specified separator or an array of venue post IDs.

$sep

(string) (Optional) The separator used in the list to separate the venue post IDs; ignored if the input value is an array.

Default value: ','


Top ↑

Return

(bool)


Top ↑

Source

File: src/Tribe/Validator/Base.php

	public function is_venue_id_list( $venues, $sep = ',' ) {
		$sep    = is_string( $sep ) ? $sep : ',';
		$venues = Tribe__Utils__Array::list_to_array( $venues, $sep );

		$valid = array_filter( $venues, array( $this, 'is_venue_id' ) );

		return ! empty( $venues ) && count( $valid ) === count( $venues );
	}

Top ↑

Changelog

Changelog
Version Description
4.6 Introduced.