From 9f54a77081ce4decdd77f1ee57749c572d1968a2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 4 Nov 2008 03:37:30 +0000 Subject: [PATCH] Redirect back to correct comment page after replying. Props Viper007Bond. fixes #8055 git-svn-id: https://develop.svn.wordpress.org/trunk@9508 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-comments-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-comments-post.php b/wp-comments-post.php index 787b25c07f..d6400f1519 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -79,7 +79,7 @@ if ( !$user->ID ) { setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); } -$location = ( empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] ) . '#comment-' . $comment_id; +$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; $location = apply_filters('comment_post_redirect', $location, $comment); wp_redirect($location);