comment_post_redirect filter-hook . WP 2.0.5
Filters the location URI to send the commenter after posting.
Usage
add_filter( 'comment_post_redirect', 'filter_function_name_9822', 10, 2 ); function filter_function_name_9822( $location, $comment ){ // filter... return $location; }
- $location(string)
- The 'redirect_to' URI sent via $_POST.
- $comment(WP_Comment)
- Comment object.
Changelog
Since 2.0.5 | Introduced. |
Where the hook is called
In file: /wp-comments-post.php
comment_post_redirect
wp-comments-post.php 78
$location = apply_filters( 'comment_post_redirect', $location, $comment );