Filter hook 'akismet_debug_log'

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

View Source

akismet_debug_log

Filter Hook
Description
Log debugging info to the error log. Enabled when WP_DEBUG_LOG is enabled (and WP_DEBUG, since according to core, "WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless WP_DEBUG is true), but can be disabled via the akismet_debug_log filter.

Hook Information

File Location wp-content/plugins/akismet/class.akismet.php View on GitHub
Hook Type Filter
Line Number 1783

Hook Parameters

Type Name Description
mixed $akismet_debug The data to log.

Usage Examples

Basic Usage
<?php
// Hook into akismet_debug_log
add_filter('akismet_debug_log', 'my_custom_filter', 10, 1);

function my_custom_filter($akismet_debug) {
    // Your custom filtering logic here
    return $akismet_debug;
}

Source Code Context

wp-content/plugins/akismet/class.akismet.php:1783 - How this hook is used in WordPress core
<?php
1778  	 * WP_DEBUG is true), but can be disabled via the akismet_debug_log filter.
1779  	 *
1780  	 * @param mixed $akismet_debug The data to log.
1781  	 */
1782  	public static function log( $akismet_debug ) {
1783  		if ( apply_filters( 'akismet_debug_log', defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG && defined( 'AKISMET_DEBUG' ) && AKISMET_DEBUG ) ) {
1784  			error_log( print_r( compact( 'akismet_debug' ), true ) );
1785  		}
1786  	}
1787  
1788  	/**

PHP Documentation

<?php
/**
	 * Log debugging info to the error log.
	 *
	 * Enabled when WP_DEBUG_LOG is enabled (and WP_DEBUG, since according to
	 * core, "WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless
	 * WP_DEBUG is true), but can be disabled via the akismet_debug_log filter.
	 *
	 * @param mixed $akismet_debug The data to log.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-content/plugins/akismet/class.akismet.php
Related Hooks

Related hooks will be displayed here in future updates.