'.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, $echo=true) { $tmp = ''.$title.''.PHP_EOL; if($echo) { echo $tmp; } return $tmp; } public static function description($description, $echo=true) { $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; } // OLD public static function url($relative = true) { if($relative) return HTML_PATH_ROOT; else return BLOG_URL; } public static function name() { global $settings; return $settings['name']; } public static function slogan() { global $settings; return $settings['slogan']; } public static function footer() { global $settings; return $settings['footer']; } public static function language() { global $settings; $lang = explode("_",$settings['locale']); return $lang[0]; } public static function locale() { global $settings; return $settings['locale']; } public static function meta_tags() { global $layout; global $seo; // The validator W3C doesn't support??? //$meta = ''.PHP_EOL; $meta = ''.PHP_EOL; if(!empty($layout['title'])) $meta .= ''.$layout['title'].''.PHP_EOL; if(!empty($layout['description'])) $meta .= ''.PHP_EOL; if(!empty($layout['generator'])) $meta .= ''.PHP_EOL; if(!empty($layout['keywords'])) $meta .= ''.PHP_EOL; if(!empty($layout['author'])) { if(filter_var($layout['author'], FILTER_VALIDATE_URL)) $meta .= ''.PHP_EOL; else $meta .= ''.PHP_EOL; } if(!empty($layout['canonical'])) $meta .= ''.PHP_EOL; if(!empty($layout['robots'])) $meta .= ''.PHP_EOL; if(!empty($seo['google_code'])) $meta .= ''.PHP_EOL; if(!empty($seo['bing_code'])) $meta .= ''.PHP_EOL; $meta .= ''.PHP_EOL; return $meta; } } ?>