Elgg
Version 2.3
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
page
elements
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
23
$stylesheets
=
elgg_get_loaded_css
();
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
};
38
_require_queue
= [];
39
</script>
$stylesheets
foreach($metas as $attributes) foreach($links as $attributes) $stylesheets
Definition:
head.php:23
elgg_get_loaded_css
elgg_get_loaded_css()
Get the loaded CSS URLs.
Definition:
elgglib.php:308
$url
$url
Definition:
exceptions.php:24
$vars
$vars['entity']
Definition:
plugin_settings.php:15
elgg_format_element
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition:
output.php:208
$links
$links
Definition:
head.php:13
$metas
$metas
The HTML head.
Definition:
head.php:12
echo
elgg echo
Translates a string.
Definition:
languages.js:48
require
elgg require
Throw an error if the required package isn't present.
Definition:
elgglib.js:164
elgg_extract
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
_require_queue
Definition:
head.php:38
$attributes
$attributes
Definition:
ajax_loader.php:13
Generated on Sat Dec 21 2024 00:01:05 for Elgg by
1.8.11