Elgg  Version 1.9
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');
39 
40 ?>
41 
42  <!--[if lt IE 9]>
43  <script src="<?php echo $html5shiv_url; ?>"></script>
44  <![endif]-->
45 
46 <?php
47 
48 foreach ($css as $url) {
49  echo elgg_format_element('link', array('rel' => 'stylesheet', 'href' => $url));
50 }
51 
52 ?>
53  <!--[if gt IE 8]>
54  <link rel="stylesheet" href="<?php echo $ie_url; ?>" />
55  <![endif]-->
56  <!--[if IE 8]>
57  <link rel="stylesheet" href="<?php echo $ie8_url; ?>" />
58  <![endif]-->
59  <!--[if IE 7]>
60  <link rel="stylesheet" href="<?php echo $ie7_url; ?>" />
61  <![endif]-->
62 
63  <script><?php echo $elgg_init; ?></script>
64 <?php
65 foreach ($js as $url) {
66  echo elgg_format_element('script', array('src' => $url));
67 }
68 
69 echo elgg_view_deprecated('page/elements/shortcut_icon', array(), "Use the 'head', 'page' plugin hook.", 1.9);
70 
71 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:266
foreach($metas as $attributes) foreach($links as $attributes) $js
Definition: head.php:31
elgg_normalize_url($url)
Definition: output.php:290
$html5shiv_url
Definition: head.php:35
$ie7_url
Definition: head.php:38
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:1464
$url
Definition: exceptions.php:24
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:194
$links
Definition: head.php:21
$ie_url
Definition: head.php:36
elgg_get_simplecache_url($type, $view)
Definition: cache.php:155
$metas
The HTML head.
Definition: head.php:20
$ie8_url
Definition: head.php:37
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:215
if(file_exists($welcome)) $vars
Definition: upgrade.php:93