← All changes
|
modules/sitemaps/sitemap-buffer-master-fallback.php
+7
-1
12.0.3
→
16.3-a.1
View file →
| @@ -9,14 +9,20 @@ | ||
| 9 | 9 | * @since 5.3.0 |
| 10 | 10 | * @package automattic/jetpack |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + exit( 0 ); | |
| 15 | +} | |
| 16 | + | |
| 13 | 17 | /** |
| 14 | 18 | * A buffer for constructing master sitemap xml files for users without libxml support. |
| 15 | 19 | * |
| 16 | 20 | * @since 5.3.0 |
| 21 | + * @phan-suppress PhanRedefinedClassReference -- Don't conflict with real version. | |
| 17 | 22 | */ |
| 18 | 23 | class Jetpack_Sitemap_Buffer_Master extends Jetpack_Sitemap_Buffer_Fallback { |
| 24 | + // @phan-suppress-previous-line UnusedSuppression -- It's used. | |
| 19 | 25 | |
| 20 | 26 | /** |
| 21 | 27 | * Returns a DOM element that contains all master sitemap elements. |
| 22 | 28 | */ |
| @@ -33,9 +39,9 @@ | ||
| 33 | 39 | . "<sitemapindex xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>" . PHP_EOL, |
| 34 | 40 | '</sitemapindex>', |
| 35 | 41 | ); |
| 36 | 42 | |
| 37 | - $this->byte_capacity -= strlen( join( '', $this->root ) ); | |
| 43 | + $this->byte_capacity -= strlen( implode( '', $this->root ) ); | |
| 38 | 44 | } |
| 39 | 45 | |
| 40 | 46 | return $this->root; |
| 41 | 47 | } |