| @@ -9,8 +9,12 @@ | ||
| 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 sitemap news xml files. |
| 15 | 19 | * |
| 16 | 20 | * @since 5.3.0 |
| @@ -59,12 +63,12 @@ | ||
| 59 | 63 | */ |
| 60 | 64 | $namespaces = apply_filters( |
| 61 | 65 | 'jetpack_sitemap_news_ns', |
| 62 | 66 | array( |
| 67 | + 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9', | |
| 68 | + 'xmlns:news' => 'http://www.google.com/schemas/sitemap-news/0.9', | |
| 63 | 69 | 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', |
| 64 | 70 | 'xsi:schemaLocation' => 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd', |
| 65 | - 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9', | |
| 66 | - 'xmlns:news' => 'http://www.google.com/schemas/sitemap-news/0.9', | |
| 67 | 71 | ) |
| 68 | 72 | ); |
| 69 | 73 | |
| 70 | 74 | $this->root = $this->doc->createElement( 'urlset' ); |