comment_flood_message
Filter HookDescription
Filters the comment flood error message.Hook Information
File Location |
wp-includes/comment.php
View on GitHub
|
Hook Type | Filter |
Line Number | 910 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$comment_flood_message
|
Comment flood error message. |
Usage Examples
Basic Usage
<?php
// Hook into comment_flood_message
add_filter('comment_flood_message', 'my_custom_filter', 10, 1);
function my_custom_filter($comment_flood_message) {
// Your custom filtering logic here
return $comment_flood_message;
}
Source Code Context
wp-includes/comment.php:910
- How this hook is used in WordPress core
<?php
905 *
906 * @since 5.2.0
907 *
908 * @param string $comment_flood_message Comment flood error message.
909 */
910 $comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) );
911
912 if ( wp_doing_ajax() ) {
913 die( $comment_flood_message );
914 }
915
PHP Documentation
<?php
/**
* Filters the comment flood error message.
*
* @since 5.2.0
*
* @param string $comment_flood_message Comment flood error message.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/comment.php
Related Hooks
Related hooks will be displayed here in future updates.