public function XMLSitemapWriter::getSitemapUrl in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::getSitemapUrl()
2 calls to XMLSitemapWriter::getSitemapUrl()
- XMLSitemapIndexWriter::generateXML in ./
xmlsitemap.xmlsitemap.inc - XMLSitemapWriter::writeXSL in ./
xmlsitemap.xmlsitemap.inc - Add the XML stylesheet to the XML page.
File
- ./
xmlsitemap.xmlsitemap.inc, line 64 - XML sitemap integration functions for xmlsitemap.module.
Class
- XMLSitemapWriter
- Extended class for writing XML sitemap files.
Code
public function getSitemapUrl($path, array $options = array()) {
$options += $this->sitemap->uri['options'];
$options += array(
'absolute' => TRUE,
'base_url' => variable_get('xmlsitemap_base_url', $GLOBALS['base_url']),
'language' => language_default(),
'alias' => TRUE,
);
if (!empty($options['protocol_relative'])) {
$options['base_url'] = preg_replace('~^https?:~', '', $options['base_url']);
}
return url($path, $options);
}