Changeset 8108
- Timestamp:
- 01/18/2019 10:33:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r8038 r8108 43 43 } 44 44 add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' ); 45 46 /** 47 * Handle the root-level redirect to trailing-slash'd uri which redirect_canonical() usually does. 48 */ 49 function enforce_trailing_slash() { 50 if ( '/plugins' === $_SERVER['REQUEST_URI'] ) { 51 wp_safe_redirect( '/plugins/' ); 52 die(); 53 } 54 } 55 add_action( 'template_redirect', __NAMESPACE__ . '\enforce_trailing_slash' ); 45 56 46 57 /**
Note: See TracChangeset
for help on using the changeset viewer.