Comment posting and redirect_to
-
When I tried to post a comment using the popup window it redirected to the post page after sending it. So I checked WP’s code and found that it wasn’t using the
redirect_to
.
In order to solve this problem, I inserted these lines intowp-comments-post.php
, just below the line$location = get_permalink($comment_post_ID);
if (isset($_POST["redirect_to"])) {
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_POST['redirect_to']);
}
It would be nice to include this on WP 😉
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Comment posting and redirect_to’ is closed to new replies.