function _css($cssLnk, $themeName = null, $browser = "", $media = "") { $lx = _cssLink($cssLnk, $themeName); if (strlen($lx) <= 0) { return false; } if ($browser != null && strlen($browser) > 0) { echo "<!--[if {$browser}]>\n"; echo "<link href='{$lx}' rel='stylesheet' type='text/css'"; if ($media != null && strlen($media) > 0) { echo " media='{$media}'"; } echo " />\n"; echo "<![endif]-->\n"; } else { echo "<link href='{$lx}' rel='stylesheet' type='text/css'"; if ($media != null && strlen($media) > 0) { echo " media='{$media}'"; } echo " />\n"; } }
/** * Smarty plugin * * @package Smarty * @subpackage PluginsFunction * @author Bismay Kumar Mohaptra */ function smarty_function_css($params) { return _cssLink($params['src']); }