You are here

function xmlsitemap_sitemap_uri in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_sitemap_uri()
  2. 7.2 xmlsitemap.module \xmlsitemap_sitemap_uri()
  3. 2.x xmlsitemap.module \xmlsitemap_sitemap_uri()

Returns the uri elements of an XML sitemap.

Parameters

$sitemap: An unserialized data array for an XML sitemap.

Return value

An array containing the 'path' and 'options' keys used to build the uri of the XML sitemap, and matching the signature of url().

Related topics

1 call to xmlsitemap_sitemap_uri()
xmlsitemap_sitemap_load_multiple in ./xmlsitemap.module
Load multiple XML sitemaps from the database.

File

./xmlsitemap.module, line 498
Main file for the xmlsitemap module.

Code

function xmlsitemap_sitemap_uri(stdClass &$sitemap) {
  xmlsitemap_load_all_includes();
  $uri['path'] = 'sitemap.xml';
  $uri['options'] = module_invoke_all('xmlsitemap_context_url_options', $sitemap->context);
  drupal_alter('xmlsitemap_context_url_options', $uri['options'], $sitemap->context);
  $uri['options'] += array(
    'absolute' => TRUE,
    'base_url' => variable_get('xmlsitemap_base_url', $GLOBALS['base_url']),
  );
  return $uri;
}