Filter hook 'akismet_delete_commentmeta_interval'

in WP Core File wp-content/plugins/akismet/class.akismet.php at line 602

View Source

akismet_delete_commentmeta_interval

Filter Hook
Description
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 Filter
Line Number 602

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into akismet_delete_commentmeta_interval
add_filter('akismet_delete_commentmeta_interval', 'my_custom_filter');

function my_custom_filter() {
    // Your custom filtering logic here
    return 'modified_value';
}

Source Code Context

wp-content/plugins/akismet/class.akismet.php:602 - How this hook is used in WordPress core
<?php
 597  	}
 598  
 599  	public static function delete_old_comments_meta() {
 600  		global $wpdb;
 601  
 602  		$interval = apply_filters( 'akismet_delete_commentmeta_interval', 15 );
 603  
 604  		// enforce a minimum of 1 day
 605  		$interval = absint( $interval );
 606  		if ( $interval < 1 ) {
 607  			$interval = 1;

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: Filter
  • Parameters: 0
  • File: wp-content/plugins/akismet/class.akismet.php
Related Hooks

Related hooks will be displayed here in future updates.