aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorEvan Winslow <evan@elgg.org>2011-03-18 21:28:05 -0700
committerEvan Winslow <evan@elgg.org>2011-03-18 21:28:05 -0700
commitdff32c364b99e57db5ea891ce93f7ab5df9b3258 (patch)
treeff0cd57619974d1ed9e8c9327434cebba9c7a1f6 /start.php
parente45dc237367658ed750701d1055e975eaef63f19 (diff)
downloadelgg-dff32c364b99e57db5ea891ce93f7ab5df9b3258.tar.gz
elgg-dff32c364b99e57db5ea891ce93f7ab5df9b3258.tar.bz2
Removed custom html5 function in favor of core function
Diffstat (limited to 'start.php')
-rw-r--r--start.php69
1 files changed, 4 insertions, 65 deletions
diff --git a/start.php b/start.php
index d83e75bcd..848190933 100644
--- a/start.php
+++ b/start.php
@@ -1,71 +1,10 @@
<?php
function html5_init() {
- elgg_extend_view('css', 'html5/css');
-
- elgg_extend_view('js/initialise_elgg', 'js/html5');
-}
-
-function html5_get_html_attributes(array $attrs = array(), $quote_style = ENT_COMPAT, $charset = 'UTF-8', $double_encode = TRUE) {
- $attrs = html5_clean_vars($attrs);
- $attributes = array();
-
- if (isset($attrs['js'])) {
- elgg_deprecated_notice("Use of the 'js' attribute was deprecated in 1.8. You can now use the js attributes directly.", '1.8');
-
- if (!empty($attrs['js'])) {
- $attributes[] = $attrs['js'];
- }
-
- unset($attrs['js']);
- }
-
- foreach ($attrs as $attr => $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');