Tribe__Events__Community__Event_Form::getHours( string $hours, string $unused_date, bool $isStart )

Return event start/end hours.


Parameters

$hours

(string) (Required) The event hours.

$unused_date

(string) (Required) The date.

$isStart

(bool) (Required) Is it the project start?


Top ↑

Return

(string) The event's hours.


Top ↑

Source

File: src/Tribe/Event_Form.php

	public function getHours( $hours, $unused_date, $isStart ) {

		if ( $isStart ) {
			if ( isset( $_REQUEST[ 'EventStartHour' ] ) ) {
				$hour = intval( $_REQUEST[ 'EventStartHour' ] );
			}
		} else {
			if ( isset( $_REQUEST[ 'EventEndHour' ] ) ) {
				$hour = intval( $_REQUEST[ 'EventEndHour' ] );
			}
		}

		if ( isset( $hour ) ) {
			return $hour;
		}

		return $hours;
	}