function buildSitemapNode($location, $lastmod = null, $changeFreq = null, $priority = null) { if (!isset($lastmod)) { $lastmod = PMF_Date::createISO8601Date($_SERVER['REQUEST_TIME'], false); } if (!isset($changeFreq)) { $changeFreq = PMF_SITEMAP_GOOGLE_CHANGEFREQ_DAILY; } $node = '<url>' . '<loc>' . PMF_String::htmlspecialchars($location) . '</loc>' . '<lastmod>' . $lastmod . '</lastmod>' . '<changefreq>' . $changeFreq . '</changefreq>' . (isset($priority) ? '<priority>' . $priority . '</priority>' : '') . '</url>'; return $node; }