Making WordPress.org


Ignore:
Timestamp:
02/12/2020 03:54:17 AM (5 years ago)
Author:
dd32
Message:

Plugin Directory: Disable Jetpack sitemaps on Rosetta sites if enabled.

Due to how the plugin directory is exposed on multiple domains, the Jetpack sitemap caching doesn't handle the different domains (and content) very well.

Fixes #5023.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r9488 r9499  
    7070
    7171        add_filter( 'jetpack_active_modules', function( $modules ) {
     72            // Disable Jetpack Search
    7273            if ( $i = array_search( 'search', $modules ) )
    7374                unset( $modules[$i] );
     75
     76            // Disable Jetpack Sitemaps on Rosetta sites.
     77            if ( !empty( $GLOBALS['rosetta'] ) ) {
     78                if ( $i = array_search( 'sitemaps', $modules ) ) {
     79                    unset( $modules[$i] );
     80                }
     81            }
     82
    7483            return $modules;
    7584        } );
Note: See TracChangeset for help on using the changeset viewer.