Elgg  Version master
tag.php
Go to the documentation of this file.
1 <?php
12 if (elgg_is_empty($value)) {
13  return;
14 }
15 
17 $vars['rel'] = 'tag';
18 
19 if ($href) {
20  unset($vars['value']);
21 
22  $vars['text'] = $value;
23  $vars['encode_text'] = true;
24 
25  echo elgg_view('output/url', $vars);
26 } else {
27  echo elgg_view('output/text', $vars);
28 }
$value
Elgg single tag output.
Definition: tag.php:11
elgg_is_empty($value)
Check if a value isn&#39;t empty, but allow 0 and &#39;0&#39;.
Definition: input.php:176
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_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$vars['class']
Elgg tag input.
Definition: tag.php:11
if(elgg_is_empty($value)) $href
Definition: tag.php:16