Elgg  Version master
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 $permalink = htmlspecialchars($entity->getURL(), ENT_NOQUOTES, 'UTF-8');
12 $pubdate = date('r', $entity->getTimeCreated());
13 $title = htmlspecialchars($entity->getDisplayName() ?? '', ENT_NOQUOTES, 'UTF-8');
14 
15 if ($entity->description) {
16  $description = elgg_autop((string) $entity->description);
17 } elseif ($entity->briefdescription) {
18  $description = elgg_autop((string) $entity->briefdescription);
19 } else {
20  $description = '';
21 }
22 
23 $creator = elgg_view('page/components/creator', $vars);
24 $georss = elgg_view('page/components/georss', $vars);
25 $extension = elgg_view('extensions/item', $vars);
26 
27 ?>
28 <item>
29  <guid isPermaLink="true"><?= $permalink; ?></guid>
30  <pubDate><?= $pubdate; ?></pubDate>
31  <link><?= $permalink; ?></link>
32  <title><![CDATA[<?= $title; ?>]]></title>
33  <description><![CDATA[<?= $description; ?>]]></description>
34  <?= $creator; ?>
35  <?= $georss; ?>
36  <?= $extension; ?>
37 </item>
$description
Definition: default.php:20
if(!$entity instanceof ElggEntity) $permalink
Definition: default.php:11
$creator
Definition: default.php:23
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof\ElggRelationship) elseif(is_callable([$item, 'getType']))
Definition: item.php:48
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
$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