Ameliabooking_Helpers::get_events_dropdown()


Source Source

File: src/integrations/ameliabooking/helpers/ameliabooking-helpers.php

	public function get_events_dropdown() {
		$events = $this->get_events();
		$options = array(
			'-1' => esc_attr__( 'Any event', 'uncanny-automator' ),
		);
		if ( ! empty( $events ) ) {
			foreach ( $events as $event ) {
				if ( ! empty( $event->name ) && ! empty( $event->id ) ) {
					$options[ $event->id ] = $event->name;
				}
			}
		}
		return $options;
	}