Changeset 6498
- Timestamp:
- 02/01/2018 06:18:31 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r6473 r6498 27 27 remove_action( 'template_redirect', 'wp_old_slug_redirect' ); 28 28 29 add_action( 'template_redirect', 'wporg_themes_trailing_slashes' ); 30 29 31 add_theme_support( 'wp4-styles' ); 30 32 } 31 33 add_action( 'after_setup_theme', 'wporg_themes_setup' ); 34 35 /** 36 * Handle the root-level redirect to trailing-slash'd uri which redirect_canonical() usually does. 37 */ 38 function wporg_themes_trailing_slashes() { 39 if ( '/themes' === $_SERVER['REQUEST_URI'] ) { 40 wp_safe_redirect( '/themes/' ); 41 die(); 42 } 43 } 32 44 33 45 /**
Note: See TracChangeset
for help on using the changeset viewer.