You are here

function xmlsitemap_engines_prepare_url in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_prepare_url()
  2. 6.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_prepare_url()
  3. 7.2 xmlsitemap_engines/xmlsitemap_engines.module \xmlsitemap_engines_prepare_url()

Replace valid tokens in the URL with their appropriate values.

Parameters

string $url: An un-tokenized URL.

Return value

string A tokenized URL.

5 calls to xmlsitemap_engines_prepare_url()
XmlSitemapEnginesFunctionalTest::testCustomURL in xmlsitemap_engines/tests/src/Functional/XmlSitemapEnginesFunctionalTest.php
Check if custom urls are functional.
XmlSitemapEnginesFunctionalTest::testPrepareURL in xmlsitemap_engines/tests/src/Functional/XmlSitemapEnginesFunctionalTest.php
Check if an url is correctly prepared.
XmlSitemapEnginesSettingsForm::buildForm in xmlsitemap_engines/src/Form/XmlSitemapEnginesSettingsForm.php
Form constructor.
XmlSitemapEnginesSettingsForm::validateForm in xmlsitemap_engines/src/Form/XmlSitemapEnginesSettingsForm.php
Form validation handler.
xmlsitemap_engines_submit_sitemaps in xmlsitemap_engines/xmlsitemap_engines.module
Submit the sitemaps to a specific URL.

File

xmlsitemap_engines/xmlsitemap_engines.module, line 155
Main file for the XML sitemap engines.

Code

function xmlsitemap_engines_prepare_url($url, $sitemap) {
  return str_replace('[sitemap]', $sitemap, $url);
}