Elgg  Version 4.3
AddRssLinkHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Page;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20  if (!_elgg_has_rss_link()) {
21  return;
22  }
23 
24  $head_params = $hook->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 }
elgg_http_add_url_query_elements($url, array $elements)
Sets elements in a URL&#39;s query string.
Definition: elgglib.php:481
__invoke(\Elgg\Hook $hook)
Add rss link to HTML head.
Add RSS link to page head.
_elgg_has_rss_link()
Should the RSS view of this URL be linked to?
Definition: views.php:1345
Models an event passed to hook handlers.
Definition: Hook.php:11
elgg_get_current_url()
Returns the current page&#39;s complete URL.