You appear to be a bot. Output may be restricted
Description
Callback to intercept sitemap url requests and serve sitemap files.
Usage
Jetpack_Sitemap_Manager::callback_action_catch_sitemap_urls();
Parameters
Returns
void
Source
File name: jetpack/modules/sitemaps/sitemaps.php
Lines:
101 to 177 of 177
if ( preg_match( $regex['image'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( $xml_content_type, $this->librarian->get_sitemap_text( $request['sitemap_name'], JP_IMAGE_SITEMAP_TYPE ) ); } // Catch image sitemap index xml. if ( preg_match( $regex['image-index'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( $xml_content_type, $this->librarian->get_sitemap_text( $request['sitemap_name'], JP_IMAGE_SITEMAP_INDEX_TYPE ) ); } // Catch image sitemap xsl. if ( preg_match( $regex['image-style'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( 'application/xml', Jetpack_Sitemap_Stylist::image_sitemap_xsl() ); } // Catch video sitemap xml. if ( preg_match( $regex['video'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( $xml_content_type, $this->librarian->get_sitemap_text( $request['sitemap_name'], JP_VIDEO_SITEMAP_TYPE ) ); } // Catch video sitemap index xml. if ( preg_match( $regex['video-index'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( $xml_content_type, $this->librarian->get_sitemap_text( $request['sitemap_name'], JP_VIDEO_SITEMAP_INDEX_TYPE ) ); } // Catch video sitemap xsl. if ( preg_match( $regex['video-style'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( 'application/xml', Jetpack_Sitemap_Stylist::video_sitemap_xsl() ); } // Catch news sitemap xml. if ( preg_match( $regex['news'], $request['sitemap_name'] ) ) { $sitemap_builder = new Jetpack_Sitemap_Builder(); $this->serve_raw_and_die( $xml_content_type, $sitemap_builder->news_sitemap_xml() ); } // Catch news sitemap xsl. if ( preg_match( $regex['news-style'], $request['sitemap_name'] ) ) { $this->serve_raw_and_die( 'application/xml', Jetpack_Sitemap_Stylist::news_sitemap_xsl() ); } } }