You appear to be a bot. Output may be restricted
Description
Callback to add sitemap to robots.txt.
Usage
Jetpack_Sitemap_Manager::callback_action_do_robotstxt();
Parameters
Returns
void
Source
File name: jetpack/modules/sitemaps/sitemaps.php
Lines:
1 to 54 of 54
public function callback_action_do_robotstxt() { /** * Filter whether to make the default sitemap discoverable to robots or not. Default true. * * @module sitemaps * @since 3.9.0 * @deprecated 7.4.0 * * @param bool $discover_sitemap Make default sitemap discoverable to robots. */ $discover_sitemap = apply_filters_deprecated( 'jetpack_sitemap_generate', array( true ), 'jetpack-7.4.0', 'jetpack_sitemap_include_in_robotstxt' ); /** * Filter whether to make the default sitemap discoverable to robots or not. Default true. * * @module sitemaps * @since 7.4.0 * * @param bool $discover_sitemap Make default sitemap discoverable to robots. */ $discover_sitemap = apply_filters( 'jetpack_sitemap_include_in_robotstxt', $discover_sitemap ); if ( true === $discover_sitemap ) { $sitemap_url = $this->finder->construct_sitemap_url( 'sitemap.xml' ); echo 'Sitemap: ' . esc_url( $sitemap_url ) . "\n"; } /** * Filter whether to make the news sitemap discoverable to robots or not. Default true. * * @module sitemaps * @since 3.9.0 * @deprecated 7.4.0 * * @param bool $discover_news_sitemap Make default news sitemap discoverable to robots. */ $discover_news_sitemap = apply_filters_deprecated( 'jetpack_news_sitemap_generate', array( true ), 'jetpack-7.4.0', 'jetpack_news_sitemap_include_in_robotstxt' ); /** * Filter whether to make the news sitemap discoverable to robots or not. Default true. * * @module sitemaps * @since 7.4.0 * * @param bool $discover_news_sitemap Make default news sitemap discoverable to robots. */ $discover_news_sitemap = apply_filters( 'jetpack_news_sitemap_include_in_robotstxt', $discover_news_sitemap ); if ( true === $discover_news_sitemap ) { $news_sitemap_url = $this->finder->construct_sitemap_url( 'news-sitemap.xml' ); echo 'Sitemap: ' . esc_url( $news_sitemap_url ) . "\n"; } }