Lines Matching refs:sitemap

17  * A class for building sitemaps and pinging search engines with the sitemap URL.
26 * The map is placed in the cache directory named sitemap.xml.gz - This
39 if ($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) return false;
41 $sitemap = Mapper::getFilePath();
43 if (file_exists($sitemap)) {
44 if (!is_writable($sitemap)) return false;
45 } elseif (!is_writable(dirname($sitemap))) {
50 @filesize($sitemap) &&
51 @filemtime($sitemap) > (time() - ($conf['sitemap'] * 86400))
57 Logger::debug("Sitemapper::generate(): using $sitemap");
60 Logger::debug('Sitemapper::generate(): creating sitemap using ' . count($pages) . ' pages');
63 // build the sitemap items
73 $eventData = ['items' => &$items, 'sitemap' => &$sitemap];
76 //save the new sitemap
77 $event->result = io_saveFile($sitemap, (new Mapper())->getXML($items));
85 * Builds the sitemap XML string from the given array auf SitemapItems.
87 * @param $items array The SitemapItems that shall be included in the sitemap.
88 * @return string The sitemap XML.
96 echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . NL;
108 * Helper function for getting the path to the sitemap file.
110 * @return string The path to the sitemap file.
118 $sitemap = $conf['cachedir'] . '/sitemap.xml';
120 $sitemap .= '.gz';
123 return $sitemap;
127 * Helper function for checking if the sitemap is compressed
129 * @return bool If the sitemap file is compressed
138 * Pings search engines with the sitemap url. Plugins can add or remove
151 $encoded_sitemap_url = urlencode(wl('', ['do' => 'sitemap'], true, '&'));
153 'google' => 'https://www.google.com/ping?sitemap=' . $encoded_sitemap_url,
154 'yandex' => 'https://webmaster.yandex.com/ping?sitemap=' . $encoded_sitemap_url