-
-
Save searchwpgists/3149c918af5ef2669e206e8430ebc0fa to your computer and use it in GitHub Desktop.
Include unapproved comments when SearchWP indexes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include unapproved comments when SearchWP indexes. | |
add_filter( 'searchwp\source\post\attributes\comments\args', function( $comment_args, $args ) { | |
$args['include_unapproved'] = true; | |
return $args; | |
}, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment