<?php
require_once __DIR__ . '/includes/helpers.php';
header('Content-Type: application/xml; charset=UTF-8');
$namespace = 'http://www.sitemaps' . '.org/schemas/sitemap/0.9';
$paths = [
    ['/', '1.0', 'daily'],
    ['/videos/', '0.9', 'daily'],
    ['/news/', '0.9', 'daily'],
    ['/insights/', '0.8', 'weekly'],
    ['/topics/', '0.8', 'weekly'],
    ['/authors/', '0.7', 'monthly'],
    ['/about/', '0.6', 'monthly'],
    ['/contact/', '0.6', 'monthly'],
    ['/faq/', '0.7', 'monthly'],
    ['/article/brand-video-guide/', '0.8', 'weekly'],
    ['/article/weekly-observation/', '0.8', 'weekly'],
    ['/article/mobile-video-seo/', '0.8', 'weekly'],
    ['/article/safe-content-review/', '0.8', 'weekly'],
    ['/data/brand-content/', '0.4', 'monthly']
];
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<urlset xmlns="<?php echo e($namespace); ?>">
<?php foreach ($paths as $item): ?>
    <url>
        <loc><?php echo e(site_url($item[0])); ?></loc>
        <lastmod><?php echo iso_date(); ?></lastmod>
        <changefreq><?php echo e($item[2]); ?></changefreq>
        <priority><?php echo e($item[1]); ?></priority>
    </url>
<?php endforeach; ?>
</urlset>
