Elgg
Version 1.11
views
default
page
components
image_block.php
Go to the documentation of this file.
1
<?php
22
$body
=
elgg_extract
(
'body'
,
$vars
,
''
);
23
$image
=
elgg_extract
(
'image'
,
$vars
,
''
);
24
$alt_image
=
elgg_extract
(
'image_alt'
,
$vars
,
''
);
25
26
$class
=
'elgg-image-block'
;
27
$additional_class
=
elgg_extract
(
'class'
,
$vars
,
''
);
28
if
(
$additional_class
) {
29
$class
=
"$class $additional_class"
;
30
}
31
32
$id
=
''
;
33
if
(isset(
$vars
[
'id'
])) {
34
$id
=
"id=\"{$vars['id']}\""
;
35
}
36
37
38
$body
=
"<div class=\"elgg-body\">$body</div>"
;
39
40
if
(
$image
) {
41
$image
=
"<div class=\"elgg-image\">$image</div>"
;
42
}
43
44
if
(
$alt_image
) {
45
$alt_image
=
"<div class=\"elgg-image-alt\">$alt_image</div>"
;
46
}
47
48
echo <<<HTML
49
<
div
class
=
"$class clearfix"
$id
>
50
$image
$alt_image
$body
51
</
div
>
52
HTML;
$alt_image
$alt_image
Definition:
image_block.php:24
$class
$class
Definition:
image_block.php:26
$additional_class
$additional_class
Definition:
image_block.php:27
$body
$body
Elgg image block pattern.
Definition:
image_block.php:22
$id
if($additional_class) $id
Definition:
image_block.php:32
$image
$image
Definition:
image_block.php:23
elgg_extract
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
$vars
if(file_exists($welcome)) $vars
Definition:
upgrade.php:93
div
fieldset div
Definition:
admin.php:470
Generated on Fri Aug 29 2025 00:00:38 for Elgg by
1.9.1