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.


Parameters

$location

(string)The 'redirect_to' URI sent via $_POST.

$comment

(WP_Comment)Comment object.


Top ↑

Source

File: wp-comments-post.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
2.0.5Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.