duplicate_comment_id filter-hook . WP 4.4.0
Filters the ID, if any, of the duplicate comment found when creating a new comment.
Return an empty value from this filter to allow what WP considers a duplicate comment.
Usage
add_filter( 'duplicate_comment_id', 'filter_function_name_2687', 10, 2 ); function filter_function_name_2687( $dupe_id, $commentdata ){ // filter... return $dupe_id; }
- $dupe_id(int)
- ID of the comment identified as a duplicate.
- $commentdata(array)
- Data for the comment being created.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
duplicate_comment_id
wp-includes/comment.php 709
$dupe_id = apply_filters( 'duplicate_comment_id', $dupe_id, $commentdata );