Fix braces so user_trailingslashit gets the correct information passed in canonical redirect code. props xorax. fixes #7483 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@8593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4b8144a688
commit
36275a8b99
@ -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