title();
}
public static function description()
{
global $Site;
return $Site->description();
}
public static function slogan()
{
global $Site;
return $Site->slogan();
}
public static function footer()
{
global $Site;
return $Site->footer();
}
public static function rssUrl()
{
if (pluginEnabled('RSS')) {
return DOMAIN_BASE.'rss.xml';
}
return false;
}
public static function sitemapUrl()
{
if (pluginEnabled('Sitemap')) {
return DOMAIN_BASE.'sitemap.xml';
}
return false;
}
public static function siteUrl()
{
global $Site;
return $Site->url();
}
public static function adminUrl()
{
global $Site;
$siteUrl = $Site->url();
return $siteUrl.ADMIN_URI_FILTER;
}
// Return the metatag
with a predefine structure
public static function headTitle()
{
global $Url;
global $Site;
global $dbTags;
global $dbCategories;
global $WHERE_AM_I;
global $page;
$title = $Site->title();
if (Text::isNotEmpty($Site->slogan())) {
$title = $Site->slogan().' | '.$Site->title();
}
if ($WHERE_AM_I=='page') {
$title = $page->title().' | '.$Site->title();
}
elseif ($WHERE_AM_I=='tag') {
$tagKey = $Url->slug();
$tagName = $dbTags->getName($tagKey);
$title = $tagName.' | '.$Site->title();
}
elseif ($WHERE_AM_I=='category') {
$categoryKey = $Url->slug();
$categoryName = $dbCategories->getName($categoryKey);
$title = $categoryName.' | '.$Site->title();
}
return ''.$title.''.PHP_EOL;
}
// Return the metatag with a predefine structure
public static function headDescription()
{
global $Site;
global $WHERE_AM_I;
global $page;
$description = $Site->description();
if( $WHERE_AM_I=='page' ) {
$description = $page->description();
}
return ''.PHP_EOL;
}
public static function charset($charset)
{
return ''.PHP_EOL;
}
public static function viewport($content)
{
return ''.PHP_EOL;
}
public static function css($files)
{
if( !is_array($files) ) {
$files = array($files);
}
$links = '';
foreach($files as $file) {
$links .= ''.PHP_EOL;
}
return $links;
}
public static function javascript($files)
{
if( !is_array($files) ) {
$files = array($files);
}
$scripts = '';
foreach($files as $file) {
$scripts .= ''.PHP_EOL;
}
return $scripts;
}
public static function js($files)
{
return self::javascript($files);
}
public static function plugins($type)
{
global $plugins;
foreach ($plugins[$type] as $plugin) {
echo call_user_func(array($plugin, $type));
}
}
public static function favicon($file='favicon.png', $typeIcon='image/png')
{
return ''.PHP_EOL;
}
public static function fontAwesome($cdn=false)
{
if ($cdn) {
return ''.PHP_EOL;
}
return ''.PHP_EOL;
}
public static function jquery($cdn=false)
{
if ($cdn) {
return '';
}
return ''.PHP_EOL;
}
public static function keywords($keywords)
{
if (is_array($keywords)) {
$keywords = implode(',', $keywords);
}
return ''.PHP_EOL;
}
}
?>