apply_filters( ‘wp_update_comment_data’, array|WP_Error $data, array $comment, array $commentarr )

Filters the comment data immediately before it is updated in the database.

Description

Note: data being passed to the filter is already unslashed.

Parameters

$dataarray|WP_Error
The new, processed comment data, or WP_Error.
$commentarray
The old, unslashed comment data.
$commentarrarray
The new, raw comment data.

Source

$data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr );

Changelog

VersionDescription
5.5.0Returning a WP_Error value from the filter will short-circuit comment update and allow skipping further processing.
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.