'.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function css($files, $path=HTML_PATH_THEME_CSS, $echo=true)
{
if(!is_array($files)) {
$files = array($files);
}
$tmp = '';
foreach($files as $file) {
$tmp .= ''.PHP_EOL;
}
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function javascript($files, $path=HTML_PATH_THEME_JS, $echo=true)
{
if(!is_array($files)) {
$files = array($files);
}
$tmp = '';
foreach($files as $file) {
$tmp .= ''.PHP_EOL;
}
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function title($title=false, $echo=true)
{
global $Url;
global $Post, $Page;
global $Site;
global $dbTags;
$tmp = $title;
if(empty($title))
{
if( $Url->whereAmI()=='post' ) {
$tmp = $Post->title().' - '.$Site->title();
}
elseif( $Url->whereAmI()=='page' ) {
$tmp = $Page->title().' - '.$Site->title();
}
elseif( $Url->whereAmI()=='tag' ) {
$tag = $dbTags->getTag($Url->slug());
$tmp = $tag.' - '.$Site->title();
}
else {
$tmp = $Site->title();
}
}
$tmp = '
'.$tmp.''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function description($description=false, $echo=true)
{
global $Url;
global $Post, $Page;
global $Site;
$tmp = $description;
if(empty($description))
{
if( $Url->whereAmI()=='post' ) {
$tmp = $Post->description();
}
elseif( $Url->whereAmI()=='page' ) {
$tmp = $Page->description();
}
else {
$tmp = $Site->description();
}
}
$tmp = ''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function keywords($keywords, $echo=true)
{
if(is_array($keywords)) {
$keywords = implode(',', $keywords);
}
$tmp = ''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function viewport($content='width=device-width, initial-scale=1.0', $echo=true)
{
$tmp = ''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function charset($charset, $echo=true)
{
$tmp = ''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function plugins($type)
{
global $plugins;
foreach($plugins[$type] as $plugin)
{
echo call_user_func(array($plugin, $type));
}
}
public static function jquery($echo=true)
{
$tmp = ''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
public static function fontAwesome($echo=true, $online=false)
{
$tmp = ''.PHP_EOL;
if($echo) {
echo $tmp;
}
return $tmp;
}
}
?>