Changeset 48470
- Timestamp:
- 07/14/2020 11:41:47 AM (4 years ago)
- Location:
- trunk/src/wp-includes/sitemaps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-index.php
r48098 r48470 76 76 77 77 if ( ! $wp_rewrite->using_permalinks() ) { 78 return add_query_arg( 'sitemap', 'index', home_url( '/' ));78 return home_url( '/?sitemap=index' ); 79 79 } 80 80 -
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php
r48100 r48470 146 146 global $wp_rewrite; 147 147 148 if ( ! $wp_rewrite->using_permalinks() ) { 149 return add_query_arg( 150 // Accounts for cases where name is not included, ex: sitemaps-users-1.xml. 151 array_filter( 152 array( 153 'sitemap' => $this->name, 154 'sitemap-subtype' => $name, 155 'paged' => $page, 156 ) 157 ), 158 home_url( '/' ) 159 ); 160 } 148 // Accounts for cases where name is not included, ex: sitemaps-users-1.xml. 149 $params = array_filter( 150 array( 151 'sitemap' => $this->name, 152 'sitemap-subtype' => $name, 153 'paged' => $page, 154 ) 155 ); 161 156 162 157 $basename = sprintf( 163 158 '/wp-sitemap-%1$s.xml', 164 implode( 165 '-', 166 // Accounts for cases where name is not included, ex: sitemaps-users-1.xml. 167 array_filter( 168 array( 169 $this->name, 170 $name, 171 (string) $page, 172 ) 173 ) 174 ) 159 implode( '-', $params ) 175 160 ); 161 162 if ( ! $wp_rewrite->using_permalinks() ) { 163 $basename = '/?' . http_build_query( $params, null, '&' ); 164 } 176 165 177 166 return home_url( $basename ); -
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-renderer.php
r48098 r48470 68 68 69 69 if ( ! $wp_rewrite->using_permalinks() ) { 70 $sitemap_url = add_query_arg( 'sitemap-stylesheet', 'sitemap', home_url( '/' ));70 $sitemap_url = home_url( '/?sitemap-stylesheet=sitemap' ); 71 71 } 72 72 … … 99 99 100 100 if ( ! $wp_rewrite->using_permalinks() ) { 101 $sitemap_url = add_query_arg( 'sitemap-stylesheet', 'index', home_url( '/' ));101 $sitemap_url = home_url( '/?sitemap-stylesheet=index' ); 102 102 } 103 103
Note: See TracChangeset
for help on using the changeset viewer.