diff --git a/system/html.php b/system/html.php index cb07ec81..0ab4ce84 100644 --- a/system/html.php +++ b/system/html.php @@ -34,12 +34,11 @@ public static function script($url, $attributes = array()) */ public static function style($url, $attributes = array()) { - if ( ! array_key_exists('media', $attributes)) - { - $attributes['media'] = 'all'; - } + if ( ! array_key_exists('media', $attributes)) $attributes['media'] = 'all'; - return ''.PHP_EOL; + $attributes = $attributes + array('rel' => 'stylesheet', 'type' => 'text/css'); + + return ''.PHP_EOL; } /** @@ -148,10 +147,7 @@ public static function mailto($email, $title = null, $attributes = array()) { $email = static::email($email); - if (is_null($title)) - { - $title = $email; - } + if (is_null($title)) $title = $email; return ''.static::entities($title).''; } @@ -240,10 +236,7 @@ public static function attributes($attributes) { // Assume numeric-keyed attributes to have the same key and value. // Example: required="required", autofocus="autofocus", etc. - if (is_numeric($key)) - { - $key = $value; - } + if (is_numeric($key)) $key = $value; if ( ! is_null($value)) { @@ -292,17 +285,17 @@ public static function obfuscate($value) */ public static function __callStatic($method, $parameters) { - // Handle the dynamic creation of links to secure routes. if (strpos($method, 'link_to_secure_') === 0) { array_unshift($parameters, substr($method, 15)); + return forward_static_call_array('HTML::link_to_secure_route', $parameters); } - // Handle the dynamic creation of links to routes. if (strpos($method, 'link_to_') === 0) { array_unshift($parameters, substr($method, 8)); + return forward_static_call_array('HTML::link_to_route', $parameters); }