Making WordPress.org

Changeset 10269


Ignore:
Timestamp:
09/16/2020 09:34:15 AM (5 years ago)
Author:
dd32
Message:

WordPress.org: Don't remove the Jetpack News sitemap.

The empty sitemap being linked in the robots.txt isn't a significant issue, isn't invalid, and can be fixed upstream if needed.

Fixes #5438.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-robots.php

    r10258 r10269  
    5959}
    6060add_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.