Elgg  Version master
excerpt.php
Go to the documentation of this file.
1 <?php
12 if (!$item instanceof \ElggEntity) {
13  return;
14 }
15 
16 $length = elgg_extract('length', $vars, 250);
17 
18 $description = $item->description ?? '';
19 
if(!$item instanceof\ElggEntity) $length
Definition: excerpt.php:16
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
Definition: output.php:83
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
$description
Definition: excerpt.php:18
$vars
Definition: theme.php:5
$item
Render an excerpt of the description.
Definition: excerpt.php:11