doc->appendChild( $this->doc->createComment( "generator='jetpack-" . JETPACK__VERSION . "'" ) ); $this->doc->appendChild( $this->doc->createProcessingInstruction( 'xml-stylesheet', 'type="text/xsl" href="' . $this->finder->construct_sitemap_url( 'video-sitemap.xsl' ) . '"' ) ); } protected function get_root_element() { if ( ! isset( $this->root ) ) { /** * Filter the XML namespaces included in video sitemaps. * * @module sitemaps * * @since 4.8.0 * * @param array $namespaces Associative array with namespaces and namespace URIs. */ $namespaces = apply_filters( 'jetpack_sitemap_video_ns', array( 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation' => 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd', 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9', 'xmlns:video' => 'http://www.google.com/schemas/sitemap-video/1.1', ) ); $this->root = $this->doc->createElement( 'urlset' ); foreach ( $namespaces as $name => $value ) { $this->root->setAttribute( $name, $value ); } $this->doc->appendChild( $this->root ); $this->byte_capacity -= strlen( $this->doc->saveXML( $this->root ) ); } return $this->root; } }