Tribe__Events__iCal::day_view_ical_link( $link )

Make sure ical link has the date in the URL instead of “today” on day view


Parameters #

$link

(Required)


Top ↑

Return #

(string)


Top ↑

Source #

File: src/Tribe/iCal.php

	public function day_view_ical_link( $link ) {
		if ( tribe_is_day() ) {

			if ( ! $wp_query = tribe_get_global_query_object() ) {
				return;
			}

			$day  = $wp_query->get( 'start_date' );
			$link = trailingslashit( esc_url( trailingslashit( tribe_get_day_link( $day ) ) . '?ical=1' ) );
		}

		return $link;
	}