WordPress at a glance
filter is not described

pre_comment_approved filter-hook . WP 2.1.0

Filters a comment's approval status before it is set.


add_filter( 'pre_comment_approved', 'filter_function_name_8798', 10, 2 );
function filter_function_name_8798( $approved, $commentdata ){
	// filter...

	return $approved;
The approval status. Accepts 1, 0, 'spam', 'trash', or WP_Error.
Comment data.


Since 2.1.0 Introduced.
Since 4.9.0 Returning a WP_Error value from the filter will short-circuit comment insertion and allow skipping further processing.

Where the hook is called

wp-includes/comment.php 847
return apply_filters( 'pre_comment_approved', $approved, $commentdata );

Where in WP core the hook is used WordPress

Usage not found.