mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 13:37:51 +01:00
Fix braces so user_trailingslashit gets the correct information passed in canonical redirect code. props xorax. fixes #7483 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@8593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ae8c9c8e53
commit
eb6e891041
@ -165,11 +165,12 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||
} else {
|
||||
foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
|
||||
$func = 'is_' . $type;
|
||||
if ( call_user_func($func) )
|
||||
if ( call_user_func($func) ) {
|
||||
$user_ts_type = $type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
|
||||
} elseif ( is_home() ) {
|
||||
$redirect['path'] = trailingslashit($redirect['path']);
|
||||
|
Loading…
Reference in New Issue
Block a user