Available since: 2.8.4
searchwp_indexer_comments_args
View Parameters »By default SearchWP retrieves all approved comments for the current post when indexing arguments. You can use this hook to customize those arguments:
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 | |
add_filter( 'searchwp_indexer_comments_args', function( $args ) { | |
// TODO: modify $args to meet your needs. Arguments are sent to get_comments() | |
// @link https://codex.wordpress.org/Function_Reference/get_comments | |
return $args; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$args |
Array |
Arguments used to retrieve comments for the post being indexed, sent directly to get_comments() |