From eb6e891041f0c63059e75cfb1c56175c0254d7e2 Mon Sep 17 00:00:00 2001 From: markjaquith 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: http://svn.automattic.com/wordpress/trunk@8593 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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']);