Filter hook 'akismet_show_user_comments_approved'

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

View Source

akismet_show_user_comments_approved

Filter Hook
Description
Add help to the Akismet page

Hook Information

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

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

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

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

Source Code Context

wp-content/plugins/akismet/class.akismet-admin.php:656 - How this hook is used in WordPress core
<?php
 651  		if ( $show_user_comments_option === false ) {
 652  			// Default to active if the user hasn't made a decision.
 653  			$show_user_comments_option = '1';
 654  		}
 655  
 656  		$show_user_comments = apply_filters( 'akismet_show_user_comments_approved', $show_user_comments_option );
 657  		$show_user_comments = $show_user_comments === 'false' ? false : $show_user_comments; // option used to be saved as 'false' / 'true'
 658  
 659  		if ( $show_user_comments ) {
 660  			$comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url );
 661  			$comment_count = intval( $comment_count );

PHP Documentation

<?php
/**
	 * Add help to the Akismet page
	 *
	 * @return false if not the Akismet page
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 0
  • File: wp-content/plugins/akismet/class.akismet-admin.php
Related Hooks

Related hooks will be displayed here in future updates.