akismet_batch_delete_count
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 | 652 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into akismet_batch_delete_count
add_action('akismet_batch_delete_count', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-content/plugins/akismet/class.akismet.php:652
- How this hook is used in WordPress core
<?php
647 $commentmeta_deleted = 0;
648
649 foreach ( $commentmeta_results as $commentmeta ) {
650 if ( 'akismet_' == substr( $commentmeta->meta_key, 0, 8 ) ) {
651 delete_comment_meta( $commentmeta->comment_id, $commentmeta->meta_key );
652 do_action( 'akismet_batch_delete_count', __FUNCTION__ );
653 ++$commentmeta_deleted;
654 }
655
656 $last_meta_id = $commentmeta->meta_id;
657 }
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.