Hooks::filter_add_template_origin_namespace( array $namespace_map, string $path, Tribe__Template $template )

Includes Event Tickets Plus into the path namespace mapping, allowing for a better namespacing when loading files.

Parameters #


(array) (Required) Indexed array containing the namespace as the key and path to strpos.


(string) (Required) Path we will do the strpos to validate a given namespace.


(Tribe__Template) (Required) Current instance of the template class.

Top ↑

Return #

(array) Namespace map after adding Pro to the list.

Top ↑

Source #

File: src/Tickets_Plus/Hooks.php

	public function filter_add_template_origin_namespace( $namespace_map, $path, $template ) {
		/** @var Plugin $main */
		$main = tribe( 'tickets-plus.main' );

		$namespace_map[ $main->template_namespace ] = $main->plugin_path;

		return $namespace_map;

Top ↑

Changelog #

Version Description
5.3.0 Introduced.