akismet_delete_comment_batch
Action HookDescription
Determines how many days a comment will be left in the Spam queue before being deleted.Hook Information
File Location |
wp-content/plugins/akismet/class.akismet.php
View on GitHub
|
Hook Type | Action |
Line Number | 591 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into akismet_delete_comment_batch
add_action('akismet_delete_comment_batch', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-content/plugins/akismet/class.akismet.php:591
- How this hook is used in WordPress core
<?php
586 do_action( 'deleted_comment', $comment_id, $comments[ $comment_id ] );
587 unset( $comments[ $comment_id ] );
588 }
589
590 clean_comment_cache( $comment_ids );
591 do_action( 'akismet_delete_comment_batch', is_countable( $comment_ids ) ? count( $comment_ids ) : 0 );
592 }
593
594 if ( apply_filters( 'akismet_optimize_table', ( mt_rand( 1, 5000 ) == 11 ), $wpdb->comments ) ) { // lucky number
595 $wpdb->query( "OPTIMIZE TABLE {$wpdb->comments}" );
596 }
PHP Documentation
<?php
/**
* Determines how many days a comment will be left in the Spam queue before being deleted.
*
* @param int The default number of days.
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-content/plugins/akismet/class.akismet.php
Related Hooks
Related hooks will be displayed here in future updates.