Changeset 8200
- Timestamp:
- 02/05/2019 08:32:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php
r7897 r8200 230 230 231 231 /** 232 * Some custom redirects for old pages no longer included in this theme. 233 */ 234 function old_page_redirects() { 235 if ( ! is_404() ) { 236 return; 237 } 238 239 // Old WordPress.org/about/* pages: 240 if ( 241 'wordpress.org' == $_SERVER['HTTP_HOST'] && 242 preg_match( '!^/about/(books|fanart|screenshots)!i', $_SERVER['REQUEST_URI'] ) 243 ) { 244 wp_safe_redirect( '/about/', 301 ); 245 die(); 246 } 247 } 248 add_filter( 'template_redirect', __NAMESPACE__ . '\old_page_redirects' ); 249 250 /** 232 251 * Custom template tags. 233 252 */
Note: See TracChangeset
for help on using the changeset viewer.