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 lang() { global $language; return $language->currentLanguageShortVersion(); } public static function rssUrl() { if (pluginActivated('pluginRSS')) { return DOMAIN_BASE.'rss.xml'; } return false; } public static function sitemapUrl() { if (pluginActivated('pluginSitemap')) { return DOMAIN_BASE.'sitemap.xml'; } return false; } // Returns the absolute URL of the site // Ex. https://example.com the method returns https://example.com/ // Ex. https://example.com/bludit/ the method returns https://example.com/bludit/ public static function siteUrl() { return DOMAIN_BASE; } // Returns the absolute URL of admin panel // Ex. https://example.com/admin/ the method returns https://example.com/admin/ // Ex. https://example.com/bludit/admin/ the method returns https://example.com/bludit/admin/ public static function adminUrl() { return DOMAIN_ADMIN; } public static function metaTags($tag) { if ($tag=='title') { return self::metaTagTitle(); } elseif ($tag=='description') { return self::metaTagDescription(); } } public static function metaTagTitle() { global $url; global $site; global $tags; global $categories; global $WHERE_AM_I; global $page; if ($WHERE_AM_I=='page') { $format = $site->titleFormatPages(); $format = Text::replace('{{page-title}}', $page->title(), $format); $format = Text::replace('{{page-description}}', $page->description(), $format); } elseif ($WHERE_AM_I=='tag') { try { $tagKey = $url->slug(); $tag = new Tag($tagKey); $format = $site->titleFormatTag(); $format = Text::replace('{{tag-name}}', $tag->name(), $format); } catch (Exception $e) { // Tag doesn't exist } } elseif ($WHERE_AM_I=='category') { try { $categoryKey = $url->slug(); $category = new Category($categoryKey); $format = $site->titleFormatCategory(); $format = Text::replace('{{category-name}}', $category->name(), $format); } catch (Exception $e) { // Category doesn't exist } } else { $format = $site->titleFormatHomepage(); } $format = Text::replace('{{site-title}}', $site->title(), $format); $format = Text::replace('{{site-slogan}}', $site->slogan(), $format); $format = Text::replace('{{site-description}}', $site->description(), $format); return '