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

Also a minor refactor to use DRY-principle.