PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | modules/sitemaps/sitemap-buffer.php +8 -2 13.7.216.3-a.1 View file →
@@ -8,8 +8,12 @@
8 8 * @since 4.8.0
9 9 * @package automattic/jetpack
10 10 */
11 11
12 +if ( ! defined( 'ABSPATH' ) ) {
13 + exit( 0 );
14 +}
15 +
12 16 /**
13 17 * A buffer for constructing sitemap xml files.
14 18 *
15 19 * Models a list of strings such that
@@ -109,10 +113,12 @@
109 113 public function __construct( $item_limit, $byte_limit, $time ) {
110 114 $this->is_full_flag = false;
111 115 $this->timestamp = $time;
112 116
113 - $this->finder = new Jetpack_Sitemap_Finder();
114 - $this->doc = new DOMDocument( '1.0', 'UTF-8' );
117 + $this->finder = new Jetpack_Sitemap_Finder();
118 + $this->doc = new DOMDocument( '1.0', 'UTF-8' );
119 + $this->doc->formatOutput = true;
120 + $this->doc->preserveWhiteSpace = false;
115 121
116 122 $this->item_capacity = max( 1, (int) $item_limit );
117 123 $this->byte_capacity = max( 1, (int) $byte_limit ) - strlen( $this->doc->saveXML() );
118 124 }