Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Page
AddRssLinkHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Page
;
4
10
class
AddRssLinkHandler
{
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'
,
30
'href'
=>
elgg_http_add_url_query_elements
(
elgg_get_current_url
(), [
31
'view'
=>
'rss'
,
32
]),
33
];
34
35
return
$head_params;
36
}
37
}
Elgg\Page\AddRssLinkHandler
Add RSS link to page head.
Definition:
AddRssLinkHandler.php:10
_elgg_has_rss_link
_elgg_has_rss_link()
Should the RSS view of this URL be linked to?
Definition:
views.php:1291
Elgg
Definition:
ActionsService.php:3
elgg_get_current_url
elgg_get_current_url()
Returns the current page's complete URL.
Definition:
pagehandler.php:121
elgg_http_add_url_query_elements
elgg_http_add_url_query_elements(string $url, array $elements)
Sets elements in a URL's query string.
Definition:
elgglib.php:183
Elgg\Page
Definition:
AddFaviconLinksHandler.php:3
Elgg\Page\AddRssLinkHandler\__invoke
__invoke(\Elgg\Event $event)
Add rss link to HTML head.
Definition:
AddRssLinkHandler.php:19
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Generated on Wed Dec 4 2024 00:00:21 for Elgg by
1.8.11