Make WordPress Core


Ignore:
Timestamp:
07/14/2020 11:41:47 AM (5 years ago)
Author:
swissspidy
Message:

Sitemaps: Pass full paths to home_url() calls.

This makes it easier for plugins using the home_url filter to detect sitemap URLs.

Props Chouby.
Fixes #50592.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sitemaps/class-wp-sitemaps-renderer.php

    r48098 r48470  
    6868
    6969        if ( ! $wp_rewrite->using_permalinks() ) {
    70             $sitemap_url = add_query_arg( 'sitemap-stylesheet', 'sitemap', home_url( '/' ) );
     70            $sitemap_url = home_url( '/?sitemap-stylesheet=sitemap' );
    7171        }
    7272
     
    9999
    100100        if ( ! $wp_rewrite->using_permalinks() ) {
    101             $sitemap_url = add_query_arg( 'sitemap-stylesheet', 'index', home_url( '/' ) );
     101            $sitemap_url = home_url( '/?sitemap-stylesheet=index' );
    102102        }
    103103
Note: See TracChangeset for help on using the changeset viewer.