comment_post_redirect WordPress Filter Hook
The comment_post_redirect hook is fired after a comment is posted on a post. It is used to redirect the user to a different page after a comment is posted.
apply_filters( 'comment_post_redirect', string $location , WP_Comment $comment ) #
Filters the location URI to send the commenter after posting.
Contents
Parameters
- $location
(string)The 'redirect_to' URI sent via $_POST.
- $comment
(WP_Comment)Comment object.
Source
File: wp-comments-post.php
Changelog
Version | Description |
---|---|
2.0.5 | Introduced. |