From 36275a8b99454797b068fe5360716c13d34cc051 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 8 Aug 2008 17:43:44 +0000 Subject: [PATCH] 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 --- wp-includes/canonical.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 06bbb183be..fe1d6e3b18 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -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']);