Admin::overwrite_templates( string $file, array $name, array $data )
Before the template from TEC is loaded load a template from EBT instead.
Contents
Parameters
- $file
-
(string) (Required) Complete path to include the PHP File.
- $name
-
(array) (Required) Template name.
- $data
-
(array) (Required) The Data that will be used on this template.
Return
(string) Complete path of the file being included.
Source
File: src/Tribe/Admin.php
public function overwrite_templates( $file, $name, array $data ) {
if ( empty( $name ) || ! is_array( $name ) ) {
return $file;
}
// Join all the names using a "_" as separator of multiple names.
$name = implode( '_', $name );
// Not the file we are looking for.
if ( 'origins_eventbrite' !== $name ) {
return $file;
}
$path = [
Tribe__Events__Tickets__Eventbrite__Main::instance()->plugin_path,
'src',
'admin-views',
'aggregator',
'origins',
'eventbrite.php',
];
return implode( DIRECTORY_SEPARATOR, $path );
}
Changelog
| Version | Description |
|---|---|
| 4.6.5 | Introduced. |