Tribe__Template::set_template_folder( array|string $folder = null )
Configures the class with the base folder in relation to the Origin
Contents
Parameters
- $folder
-
(array|string) (Optional) Which folder we are going to look for templates
Default value: null
Return
(self)
Source
File: src/Tribe/Template.php
public function set_template_folder( $folder = null ) {
// Allows configuring a already set class
if ( ! isset( $folder ) ) {
$folder = $this->folder;
}
// If Folder is String make it an Array
if ( is_string( $folder ) ) {
$folder = (array) explode( '/', $folder );
}
// Cast as Array and save
$this->folder = (array) $folder;
return $this;
}
Changelog
| Version | Description |
|---|---|
| 4.6.2 | Introduced. |