comment_save_pre WordPress Filter Hook

The comment_save_pre hook is run before a comment is saved to the database. This hook gives you a chance to modify the comment data before it is saved. You can use this hook to add or remove data from the comment, or even to cancel the save altogether.

apply_filters( 'comment_save_pre', string $comment_content ) #

Filters the comment content before it is updated in the database.


Parameters

$comment_content

(string)The comment data.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

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.

Show More
Show More