Elgg  Version 4.3
default.php
Go to the documentation of this file.
1 <?php
6 $entity = elgg_extract('entity', $vars);
7 if (!$entity instanceof ElggUser) {
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 $description = $entity->getProfileData('description');
16 if (!empty($description)) {
18 }
19 
20 $georss = elgg_view('page/components/georss', $vars);
21 $extension = elgg_view('extensions/item', $vars);
22 
23 $item = <<<__HTML
24 <item>
25  <guid isPermaLink="true">$permalink</guid>
26  <pubDate>$pubdate</pubDate>
27  <link>$permalink</link>
28  <title><![CDATA[$title]]></title>
29  <description><![CDATA[$description]]></description>
31 </item>
32 
33 __HTML;
34 
35 echo $item;
$description
Definition: default.php:20
if(!$entity instanceof ElggEntity) $permalink
Definition: default.php:11
if(!$site) if(!($site instanceof ElggSite)) $site description
Definition: settings.php:20
elgg_autop($string)
Create paragraphs from text with line spacing.
Definition: output.php:56
$item
Definition: default.php:27
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:24
$georss
Definition: default.php:24
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:547
$entity
Generic icon view.
Definition: default.php:13
$title
Definition: default.php:28
elgg echo
Translates a string.
Definition: deprecated.js:530
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
$pubdate
Definition: default.php:12
$extension
Definition: default.php:25