From dff32c364b99e57db5ea891ce93f7ab5df9b3258 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Fri, 18 Mar 2011 21:28:05 -0700 Subject: Removed custom html5 function in favor of core function --- start.php | 69 ++++----------------------------------------------------------- 1 file changed, 4 insertions(+), 65 deletions(-) (limited to 'start.php') diff --git a/start.php b/start.php index d83e75bcd..848190933 100644 --- a/start.php +++ b/start.php @@ -1,71 +1,10 @@ $val) { - $attr = strtolower($attr); - - if ($val === TRUE) { - $attributes[] = $attr; - } elseif (!empty($val)) { - //allow multi-value attributes to be passed as array - if (is_array($val)) { - sort($val); //gzip? - - $val = implode(' ', $val); - } - - $val = htmlspecialchars($val, $quote_style, $charset, $double_encode); - $attributes[] = "$attr=\"$val\""; - } - } - - sort($attributes); //gzip? - - return implode(' ', $attributes); -} + elgg_extend_view('css/screen', 'html5/css'); -// remove all the junk that elgg_view throws into $vars -function html5_clean_vars(array $vars = array()) { - unset($vars['config']); - unset($vars['url']); - unset($vars['page_owner']); - unset($vars['page_owner_user']); - - foreach ($_SESSION as $key => $value) { - unset($vars[$key]); - } - - // backwards compatibility code - if (isset($vars['internalname'])) { - $vars['name'] = $vars['internalname']; - unset($vars['internalname']); - } - - if (isset($vars['internalid'])) { - $vars['id'] = $vars['internalid']; - unset($vars['internalid']); - } - - return $vars; + elgg_register_js('Modernizr', 'mod/html5/js/Modernizr-1.5.js', 'head', 1); + elgg_register_js('jquery.placeholder', 'mod/html5/js/jquery.placeholder-1.0.1.js', 'footer'); } -register_elgg_event_handler('init', 'system', 'html5_init'); +elgg_register_event_handler('init', 'system', 'html5_init'); -- cgit v1.2.3