Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
page
elements
html.php
Go to the documentation of this file.
1
<?php
10
// Set the content type
11
elgg_set_http_header
(
'Content-type: text/html; charset=utf-8'
);
12
13
$lang
=
elgg_get_current_language
();
14
15
$default_html_attrs
= [
16
'xmlns'
=>
'http://www.w3.org/1999/xhtml'
,
17
'xml:lang'
=>
$lang
,
18
'lang'
=>
$lang
,
19
];
20
$html_attrs
=
elgg_extract
(
'html_attrs'
,
$vars
, []);
21
$html_attrs
= array_merge(
$default_html_attrs
,
$html_attrs
);
22
23
$body_attrs
=
elgg_extract
(
'body_attrs'
,
$vars
, []);
24
?>
25
<!DOCTYPE html>
26
<?php
27
28
$head
=
elgg_format_element
(
'head'
, [],
elgg_extract
(
'head'
,
$vars
,
''
));
29
$body
=
elgg_format_element
(
'body'
,
$body_attrs
,
elgg_extract
(
'body'
,
$vars
,
''
));
30
31
echo
elgg_format_element
(
'html'
,
$html_attrs
,
$head
.
$body
);
elgg_get_current_language
elgg_get_current_language()
Get the current system/user language or 'en'.
Definition:
languages.php:27
$html_attrs
$html_attrs
Definition:
html.php:20
$default_html_attrs
$default_html_attrs
Definition:
html.php:15
$body
if(!empty($unknowns)) $body
Definition:
html.php:79
elgg_extract
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition:
elgglib.php:254
elgg_set_http_header
elgg_set_http_header(string $header, bool $replace=true)
Set a response HTTP header.
Definition:
elgglib.php:26
$body_attrs
$body_attrs
Definition:
html.php:23
$lang
$lang
Definition:
html.php:13
$head
$head
Definition:
html.php:11
$vars
$vars['head']
Definition:
html.php:24
elgg_format_element
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition:
output.php:145
Generated on Sat Dec 21 2024 00:02:53 for Elgg by
1.8.11