Elgg  Version 5.1
AddRssLinkHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Page;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20  if (!_elgg_has_rss_link()) {
21  return;
22  }
23 
24  $head_params = $event->getValue();
25 
26  $head_params['links']['rss'] = [
27  'rel' => 'alternative',
28  'type' => 'application/rss+xml',
29  'title' => 'RSS',
31  'view' => 'rss',
32  ]),
33  ];
34 
35  return $head_params;
36  }
37 }
Add RSS link to page head.
_elgg_has_rss_link()
Should the RSS view of this URL be linked to?
Definition: views.php:1312
elgg_get_current_url()
Returns the current page&#39;s complete URL.
elgg_http_add_url_query_elements(string $url, array $elements)
Sets elements in a URL&#39;s query string.
Definition: elgglib.php:181
__invoke(\Elgg\Event $event)
Add rss link to HTML head.
Models an event passed to event handlers.
Definition: Event.php:11