Introduces filter for sitemap base URL, as requested by WPML.
Minor refactor to use DRY-principle.
Merge pull request #1579 from tacoverdo/master

Introduces filter for sitemap base URL, as requested by WPML.