Tribe__Events__Validator__Base::is_organizer_id_list( string|array $organizers, string $sep = ',' )
Whether a list or array of organizer post IDs only contains valid organizer IDs or not.
Contents
Parameters
- $organizers
-
(string|array) (Required) A list of organizer post IDs separated by the specified separator or an array of organizer post IDs.
- $sep
-
(string) (Optional) The separator used in the list to separate the organizer post IDs; ignored if the input value is an array.
Default value: ','
Return
(bool)
Source
File: src/Tribe/Validator/Base.php
public function is_organizer_id_list( $organizers, $sep = ',' ) {
$sep = is_string( $sep ) ? $sep : ',';
$organizers = Tribe__Utils__Array::list_to_array( $organizers, $sep );
$valid = array_filter( $organizers, array( $this, 'is_organizer_id' ) );
return ! empty( $organizers ) && count( $valid ) === count( $organizers );
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Introduced. |