function 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

1 call to views_plugin_style_rss::get_channel_elements_atom_link()
views_plugin_style_rss::render in plugins/views_plugin_style_rss.inc
Render the display in this style.

File

plugins/views_plugin_style_rss.inc, line 93

Class

views_plugin_style_rss
Default style plugin to render an RSS feed.

Code

public 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',
      ),
    ),
  );
}