View::get_registered_views()

Returns an associative array of Views currently registered.


Return

(array) An array in the shape [ <slug> => <View Class> ].


Top ↑

Source

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

	public static function get_registered_views() {
		/**
		 * Filters the list of views available.
		 *
		 * Both classes and built objects can be associated with a slug; if bound in the container the classes
		 * will be built according to the binding rules; objects will be returned as they are.
		 *
		 * @param array $views An associative  array of views in the shape `[ <slug> => <class> ]`.
		 *
		 * @since 4.9.2
		 *
		 */
		$views = apply_filters( 'tribe_events_views', [
			'month'     => Month_View::class,
			'list'      => List_View::class,
			'past'      => List_View::class,
			'reflector' => Reflector_View::class,
		] );

		return (array) $views;
	}

Top ↑

Changelog

Changelog
Version Description
4.9.2 Introduced.