Tribe__Events__Editor__Template__Overwrite::get_path( array|string $slug )

Gets the file path in Gutenberg Ext


Parameters

$slug

(array|string) (Required) Which file we want to include


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Editor/Template/Overwrite.php

	public function get_path( $slug ) {
		$slug = (array) $slug;

		$file = implode( '/', array_map( 'sanitize_file_name', $slug ) ) . '.php';
		/**
		 * @todo replace with real plugin template, once is moved out of the extension
		 */
		$directory = 'src/views/';
		return tribe( 'tec.main' )->plugin_path . $directory . $file;
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.