Changeset 9064 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
- Timestamp:
- 07/19/2019 02:02:48 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r8935 r9064 47 47 $url = str_ireplace( '/index.php', '/', $_SERVER['REQUEST_URI'] ); 48 48 wp_safe_redirect( $url, 301 ); 49 die(); 50 } 51 52 // We don't support pagination on the directory at present. 53 if ( get_query_var( 'paged' ) ) { 54 $url = remove_query_arg( 'paged' ); 55 $url = preg_replace( '!page/\d+!i', '', $url ); 56 57 // Remove any double slashes 58 $url = preg_replace( '!/{2,}!', '/', $url ); 59 60 wp_safe_redirect( $url ); // Not 301, as paginated requests will one day be supported hopefully. 49 61 die(); 50 62 }
Note: See TracChangeset
for help on using the changeset viewer.