Elgg  Version 4.3
metadata.php
Go to the documentation of this file.
1 <?php
9 $metadata = elgg_extract('metadata', $vars, '');
10 if ($metadata === false) {
11  return;
12 }
13 
14 $annotation = elgg_extract('annotation', $vars);
15 if ($metadata === '' && $annotation instanceof ElggAnnotation) {
16  $metadata = elgg_view_menu('annotation', [
17  'annotation' => $annotation,
18  'class' => 'elgg-menu-hz',
19  'prepare_dropdown' => true,
20  ]);
21 }
22 
24  return;
25 }
26 
27 echo elgg_format_element('div', ['class' => [
28  'elgg-listing-summary-metadata',
29 ]], $metadata);
elgg_is_empty($value)
Check if a value isn&#39;t empty, but allow 0 and &#39;0&#39;.
Definition: input.php:179
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:468
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
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:547
$metadata
Output annotation metadata.
Definition: metadata.php:9
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
if($metadata===false) $annotation
Definition: metadata.php:14