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 $permalink = htmlspecialchars($entity->getURL(), ENT_NOQUOTES, 'UTF-8');
15 $pubdate = date('r', $entity->getTimeCreated());
16 $title = htmlspecialchars($entity->getDisplayName(), ENT_NOQUOTES, 'UTF-8');
17 
18 if ($entity->description) {
19  $description = elgg_autop($entity->description);
20 } else {
21  $description = '';
22 }
23 
24 $georss = elgg_view('page/components/georss', $vars);
25 $extension = elgg_view('extensions/item', $vars);
26 
27 $item = <<<__HTML
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>
35 </item>
36 
37 __HTML;
38 
39 echo $item;
$description
Definition: default.php:23
if(!$entity instanceof ElggEntity) $permalink
Definition: default.php:14
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
$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