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