WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
762 | false, |
763 | $commentdata['comment_author_IP'], |
764 | $commentdata['comment_author_email'], |
765 | $commentdata['comment_date_gmt'], |
766 | $wp_error |
767 | ); |
768 |
|
769 | if ( $is_flood ) { |
770 | /** This filter is documented in wp-includes/comment-template.php */ |
771 | $comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) ); |
772 |
|
773 | return new WP_Error( 'comment_flood', $comment_flood_message, 429 ); |
774 | } |
775 |
|
776 | return wp_check_comment_data( $commentdata ); |
777 | } |
778 |
|
779 | /** |
780 | * Hooks WP's native database-based comment-flood check. |
Line | Code |
870 | return true; |
871 | } else { |
872 | /** |
873 | * Filters the comment flood error message. |
874 | * |
875 | * @since 5.2.0 |
876 | * |
877 | * @param string $comment_flood_message Comment flood error message. |
878 | */ |
879 | $comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) ); |
880 |
|
881 | if ( wp_doing_ajax() ) { |
882 | die( $comment_flood_message ); |
883 | } |
884 |
|
885 | wp_die( $comment_flood_message, 429 ); |
886 | } |
887 | } |
888 | } |