Changeset 48072 for trunk/src/wp-includes/canonical.php
- Timestamp:
- 06/17/2020 03:22:49 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r48026 r48072 508 508 if ( ! empty( $addl_path ) ) { 509 509 $redirect['path'] = trailingslashit( $redirect['path'] ) . $addl_path; 510 } 511 512 // Remove trailing slash for sitemaps requests. 513 if ( ! empty( get_query_var( 'sitemap' ) ) ) { 514 $redirect['path'] = untrailingslashit( $redirect['path'] ); 510 515 } 511 516 … … 652 657 } 653 658 659 // Remove trailing slash for sitemaps requests. 660 if ( ! empty( get_query_var( 'sitemap' ) ) || ! empty( get_query_var( 'sitemap-stylesheet' ) ) ) { 661 $redirect['path'] = untrailingslashit( $redirect['path'] ); 662 } 663 654 664 // Strip multiple slashes out of the URL. 655 665 if ( strpos( $redirect['path'], '//' ) > -1 ) {
Note: See TracChangeset
for help on using the changeset viewer.