tribe_get_prev_event_link( bool|string $anchor = false )

Returns a link to the previous event by start date for the given event.


Parameters

$anchor

(bool|string) (Optional) (optional) The link text. Use %title% to place the post title in your string. Default is false.

Default value: false


Top ↑

Return

(string) The link to the previous event.


Top ↑

Source

File: src/functions/template-tags/link.php

	function tribe_get_prev_event_link( $anchor = false ) {
		$event_id = get_the_ID();

		tribe( 'tec.adjacent-events' )->set_current_event_id( $event_id );

		/**
		 * Filter the output of the link to the previous event by start date of a given event.
		 *
		 * @param string $prev_event_link The link to the previous event.
		 * @param int    $event_id        The ID of the reference event.
		 */
		return apply_filters( 'tribe_get_prev_event_link', tribe( 'tec.adjacent-events' )->get_prev_event_link( $anchor ), $event_id );
	}

Top ↑

Changelog

Changelog
Version Description
3.0 Introduced.