Changeset 10258
- Timestamp:
- 09/15/2020 11:49:02 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-robots.php
r9818 r10258 40 40 if ( 'wordpress.org' === $blog_details->domain ) { 41 41 $robots = "Sitemap: https://wordpress.org/news/sitemap.xml\n" . 42 "Sitemap: https://wordpress.org/news/news-sitemap.xml\n" .43 42 "Sitemap: https://wordpress.org/showcase/sitemap.xml\n" . 44 "Sitemap: https://wordpress.org/showcase/news-sitemap.xml\n" .45 43 $robots; 46 44 } … … 49 47 * Add the Plugins and Theme directory Sitemaps 50 48 * Currently disabled for Rosetta as Jetpack sitemaps aren't working there. 51 * Themes are currently disabled as there's a redirect in place breaking direct access.52 49 */ 53 50 if ( … … 62 59 } 63 60 add_filter( 'robots_txt', 'wporg_robots_prefix_sitemaps', 1 ); 61 62 // Remove the Jetpack News sitemap when there's no news on the site. 63 // Remove once the upstream Jetpack issue is closed or merged https://meta.trac.wordpress.org/ticket/5438 64 add_filter( 'jetpack_news_sitemap_include_in_robotstxt', function( $include ) { 65 if ( $include && empty( wp_count_posts()->publish ) ) { 66 $include = false; 67 } 68 69 return $include; 70 } );
Note: See TracChangeset
for help on using the changeset viewer.