Hooks::filter_tribe_events_v2_view_title( string $title, bool $depth = true, Tribe__Context $context = null, array $posts = array() )

Filters the Views v2 event page title, applying modifications for PRO Views.


Parameters

$title

(string) (Required) The current page title.

$depth

(bool) (Optional) Flag to build the title of a taxonomy archive with depth in hierarchical taxonomies or not.

Default value: true

$context

(Tribe__Context) (Optional) The current title render context.

Default value: null

$posts

(array) (Optional) An array of events fetched by the View.

Default value: array()


Top ↑

Return

(string) The title, either the modified version if the rendering View is a PRO one requiring it, or the original one.


Top ↑

Source

File: src/Tribe/Views/V2/Hooks.php

	public function filter_tribe_events_v2_view_title( $title, $depth = true, $context = null, array $posts = [] ) {
		$new_title = $this->container->make( Title::class )
		                             ->set_context( $context )
		                             ->set_posts( $posts )
		                             ->build_title();

		return $new_title ?: $title;
	}

Top ↑

Changelog

Changelog
Version Description
4.7.9 Introduced.