????JFIF??x?x????'
| Server IP : 104.21.30.238 / Your IP : 216.73.216.87 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/./self/cwd/wp-content/plugins/jetpack/modules/sitemaps/ |
Upload File : |
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* XMLWriter implementation of the master sitemap buffer.
*
* @since 14.6
* @package automattic/jetpack
*/
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
/**
* A buffer for constructing master sitemap xml files using XMLWriter.
*
* @since 14.6
*/
class Jetpack_Sitemap_Buffer_Master_XMLWriter extends Jetpack_Sitemap_Buffer_XMLWriter {
/**
* Initialize the buffer with required headers (no root element here).
*/
protected function initialize_buffer() {
// Add generator comment
$this->writer->writeComment( "generator='jetpack-" . JETPACK__VERSION . "'" );
$this->writer->writeComment( 'Jetpack_Sitemap_Buffer_Master_XMLWriter' );
// Add stylesheet
$this->writer->writePi(
'xml-stylesheet',
'type="text/xsl" href="' . $this->finder->construct_sitemap_url( 'sitemap-index.xsl' ) . '"'
);
}
/**
* Start the root element and write its namespaces.
*/
protected function start_root() {
$this->writer->startElement( 'sitemapindex' );
$this->writer->writeAttribute( 'xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9' );
}
/**
* Append a sitemap entry to the master sitemap.
*
* @param array $array The sitemap item to append.
*/
protected function append_item( $array ) {
if ( ! empty( $array['sitemap'] ) ) {
$this->array_to_xml( $array );
}
}
}