Elgg  Version 1.11
head.php
Go to the documentation of this file.
1 <?php
20 $metas = elgg_extract('metas', $vars, array());
21 $links = elgg_extract('links', $vars, array());
22 
23 echo elgg_format_element('title', array(), $vars['title'], array('encode_text' => true));
24 foreach ($metas as $attributes) {
25  echo elgg_format_element('meta', $attributes);
26 }
27 foreach ($links as $attributes) {
28  echo elgg_format_element('link', $attributes);
29 }
30 
33 $elgg_init = elgg_view('js/initialize_elgg');
34 
35 $html5shiv_url = elgg_normalize_url('vendors/html5shiv.js');
37 
38 ?>
39 
40  <!--[if lt IE 9]>
41  <script src="<?php echo $html5shiv_url; ?>"></script>
42  <![endif]-->
43 
44 <?php
45 
46 foreach ($css as $url) {
47  echo elgg_format_element('link', array('rel' => 'stylesheet', 'href' => $url));
48 }
49 
50 ?>
51  <!--[if gt IE 8]>
52  <link rel="stylesheet" href="<?php echo $ie_url; ?>" />
53  <![endif]-->
54 
55  <script><?php echo $elgg_init; ?></script>
56 <?php
57 foreach ($js as $url) {
58  echo elgg_format_element('script', array('src' => $url));
59 }
60 
61 echo elgg_view_deprecated('page/elements/shortcut_icon', array(), "Use the 'head', 'page' plugin hook.", 1.9);
62 
63 echo elgg_view_deprecated('metatags', array(), "Use the 'head', 'page' plugin hook.", 1.8);
elgg_get_loaded_css()
Get the loaded CSS URLs.
Definition: elgglib.php:265
foreach($metas as $attributes) foreach($links as $attributes) $js
Definition: head.php:31
elgg_normalize_url($url)
Definition: output.php:311
$html5shiv_url
Definition: head.php:35
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1246
$url
Definition: exceptions.php:24
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:215
$links
Definition: head.php:21
$ie_url
Definition: head.php:36
elgg_get_simplecache_url($type, $view)
Definition: cache.php:117
$metas
The HTML head.
Definition: head.php:20
elgg_view_deprecated($view, array $vars, $suggestion, $version)
Display a view with a deprecation notice.
Definition: views.php:371
$elgg_init
Definition: head.php:33
elgg echo
Translates a string.
Definition: languages.js:43
if($links) endif
Definition: full.php:230
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$css
Definition: head.php:32
$attributes
Definition: ajax_loader.php:13
elgg_get_loaded_js($location= 'head')
Get the JavaScript URLs that are loaded.
Definition: elgglib.php:214
if(file_exists($welcome)) $vars
Definition: upgrade.php:93