You are here

function xmlsitemap_sitemap_uri in XML sitemap 7.2

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

Returns the uri elements of an XML sitemap.

Parameters

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

Return value

array 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 561
xmlsitemap XML sitemap

Code

function xmlsitemap_sitemap_uri(stdClass $sitemap) {
  global $base_url;
  $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', $base_url),
  );
  return $uri;
}