1 views_plugin_style_rss.inc | views_plugin_style_rss::get_channel_elements_atom_link() |
Return an atom:link XHTML element to add to the channel, to comply with the RSS 2.0 specification.
Return value
An array that can be passed to format_xml_elements().:
See also
http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
File
- core/
modules/ views/ plugins/ views_plugin_style_rss.inc, line 92 - Contains the RSS style plugin.
Class
- views_plugin_style_rss
- Default style plugin to render an RSS feed.
Code
function get_channel_elements_atom_link() {
$url_options = array('absolute' => TRUE);
$input = $this->view->get_exposed_input();
if ($input) {
$url_options['query'] = $input;
}
$url = url($this->view->get_url(), $url_options);
return array(
array(
'namespace' => array('xmlns:atom' => 'http://www.w3.org/2005/Atom'),
'key' => 'atom:link',
'attributes' => array(
'href' => $url,
'rel' => 'self',
'type' => 'application/rss+xml',
),
),
);
}