init
This commit is contained in:
38
classes/loader.php
Normal file
38
classes/loader.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* core/template/navigation.php
|
||||
*
|
||||
* This class is for managing template navigation including menus, pagination, and breadcrumbs.
|
||||
*
|
||||
* @version 3.0
|
||||
* @author Joey Kimsey <Joey@thetempusproject.com>
|
||||
* @link https://TheTempusProject.com/Core
|
||||
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
|
||||
*/
|
||||
namespace TheTempusProject\Houdini\Classes;
|
||||
|
||||
use TheTempusProject\Houdini\Classes\Components;
|
||||
|
||||
class Loader {
|
||||
protected $cssIncludes = [];
|
||||
protected $jsIncludes = [];
|
||||
|
||||
public function buildComponents() {
|
||||
Components::append( 'TEMPLATE_CSS_INCLUDES', implode( "\n", $this->cssIncludes ) );
|
||||
Components::append( 'TEMPLATE_JS_INCLUDES', implode( "\n", $this->jsIncludes ) );
|
||||
}
|
||||
|
||||
public function addCss( $text, $parse = true ) {
|
||||
if ( $parse ) {
|
||||
$text = Template::parse( $text );
|
||||
}
|
||||
$this->cssIncludes[] = $text;
|
||||
}
|
||||
|
||||
public function addJs( $text, $parse = true ) {
|
||||
if ( $parse ) {
|
||||
$text = Template::parse( $text );
|
||||
}
|
||||
$this->jsIncludes[] = $text;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user