Elgg  Version 2.3
head.php
Go to the documentation of this file.
1 <?php
12 $metas = elgg_extract('metas', $vars, array());
13 $links = elgg_extract('links', $vars, array());
14 
15 echo elgg_format_element('title', array(), $vars['title'], array('encode_text' => true));
16 foreach ($metas as $attributes) {
17  echo elgg_format_element('meta', $attributes);
18 }
19 foreach ($links as $attributes) {
20  echo elgg_format_element('link', $attributes);
21 }
22 
24 
25 foreach ($stylesheets as $url) {
26  echo elgg_format_element('link', array('rel' => 'stylesheet', 'href' => $url));
27 }
28 
29 // A non-empty script *must* come below the CSS links, otherwise Firefox will exhibit FOUC
30 // See https://github.com/Elgg/Elgg/issues/8328
31 ?>
32 <script>
33  <?php // Do not convert this to a regular function declaration. It gets redefined later. ?>
34  require = function () {
35  // handled in the view "elgg.js"
36  _require_queue.push(arguments);
37  };
39 </script>
foreach($metas as $attributes) foreach($links as $attributes) $stylesheets
Definition: head.php:23
elgg_get_loaded_css()
Get the loaded CSS URLs.
Definition: elgglib.php:308
$url
Definition: exceptions.php:24
$vars['entity']
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:208
$links
Definition: head.php:13
$metas
The HTML head.
Definition: head.php:12
elgg echo
Translates a string.
Definition: languages.js:48
elgg require
Throw an error if the required package isn&#39;t present.
Definition: elgglib.js:164
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1375
_require_queue
Definition: head.php:38
$attributes
Definition: ajax_loader.php:13