Elgg  Version 6.1
default.php
Go to the documentation of this file.
1 <?php
6 $entity = elgg_extract('entity', $vars);
7 if (!$entity instanceof ElggEntity) {
8  return;
9 }
10 
11 $title = $entity->getDisplayName();
12 if (empty($title)) {
13  $title = strip_tags($entity->description ?? '');
15 }
16 
17 $permalink = htmlspecialchars($entity->getURL(), ENT_NOQUOTES, 'UTF-8');
18 $pubdate = date('r', $entity->getTimeCreated());
19 
20 $description = elgg_autop((string) $entity->description);
21 
22 $creator = elgg_view('page/components/creator', $vars);
23 $georss = elgg_view('page/components/georss', $vars);
24 $extension = elgg_view('extensions/item', $vars);
25 
26 ?>
27 <item>
28  <guid isPermaLink="true"><?= $permalink; ?></guid>
29  <pubDate><?= $pubdate; ?></pubDate>
30  <link><?= $permalink; ?></link>
31  <title><![CDATA[<?= $title; ?>]]></title>
32  <description><![CDATA[<?= $description; ?>]]></description>
33  <?= $creator; ?>
34  <?= $georss; ?>
35  <?= $extension; ?>
36 </item>
$description
Definition: default.php:20
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
Definition: output.php:83
if(!$entity instanceof ElggEntity) $permalink
Definition: default.php:11
$creator
Definition: default.php:23
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:256
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$site description
Definition: settings.php:14
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:25
$georss
Definition: default.php:24
$entity
Generic icon view.
Definition: default.php:13
elgg_autop(string $string)
Create paragraphs from text with line spacing.
Definition: output.php:67
$title
Definition: default.php:29
$pubdate
Definition: default.php:12
$extension
Definition: default.php:25