add_shortcode('zency_kort', function($atts) {

    $atts = shortcode_atts([
        'city'   => '',
        'height' => '450',
    ], $atts, 'zency_kort');

    $city = sanitize_text_field($atts['city']);

    if (empty($city)) {

        $behandlingstyper = [
            'gravidmassage', 'sportsmassage', 'fysiurgisk-massage',
            'dybdegaaende-massage', 'oliemassage', 'wellness-massage',
            'bindevaevsmassage', 'thai-massage', 'klassisk-massage',
        ];

        $path  = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
        $parts = explode('/', $path);

        $massageIdx = array_search('massage', $parts);
        $bySegments = [];
        if ($massageIdx !== false) {
            $bySegments = array_slice($parts, $massageIdx + 1);
        }

        $bySegments = array_filter($bySegments, function($seg) use ($behandlingstyper) {
            return !empty($seg) && !in_array($seg, $behandlingstyper);
        });
        $bySegments = array_values($bySegments);

        if (!empty($bySegments)) {
            $city = end($bySegments);
        }
    }

    $city = str_replace(
        ['å','æ','ø','Å','Æ','Ø'],
        ['aa','ae','oe','aa','ae','oe'],
        $city
    );
    $city = preg_replace('/[^a-z0-9]/', '', strtolower($city));

    $kortUrl = content_url('uploads/behandler-kort-v4.html');
    if (!empty($city)) {
        $kortUrl .= '?city=' . urlencode($city);
    }

    $height = absint($atts['height']) ?: 450;
    $visNavn = ucwords(str_replace('-', ' ', $city)) ?: 'Danmark';

    return sprintf(
        '<iframe src="%s" title="Massagebehandlere i %s" width="100%%" height="%dpx" loading="lazy" style="border:none;display:block;border-radius:10px;" referrerpolicy="no-referrer"></iframe>',
        esc_url($kortUrl),
        esc_attr($visNavn),
        $height
    );
});<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//zency.dk/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://zency.dk/post-sitemap.xml</loc>
		<lastmod>2026-03-10T11:29:16+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/page-sitemap.xml</loc>
		<lastmod>2026-04-03T11:16:01+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/by_kropsterapi-sitemap.xml</loc>
		<lastmod>2026-01-08T08:54:34+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/by_fysioterapi-sitemap.xml</loc>
		<lastmod>2025-12-23T15:52:11+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/symptomer-sitemap.xml</loc>
		<lastmod>2026-03-18T12:51:58+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/by-sitemap.xml</loc>
		<lastmod>2026-04-02T19:53:35+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/behandling-sitemap.xml</loc>
		<lastmod>2026-03-27T19:06:54+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/behandler-sitemap.xml</loc>
		<lastmod>2026-04-05T15:44:54+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/video-sitemap.xml</loc>
		<lastmod>2026-03-27T18:34:01+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://zency.dk/local-sitemap.xml</loc>
		<lastmod>2025-12-30T07:25:44+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->