- Timestamp:
- 07/14/2020 11:41:47 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 );
Note: See TracChangeset
for help on using the changeset viewer.