SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.8.4

searchwp_indexer_comment

View Parameters »

By default SearchWP indexes only comment content when comments have been added to a search engine configuration.

Related: searchwp_include_comment_author and searchwp_include_comment_email

You can use this hook to modify the entire comment object that SearchWP analyzes when indexing:

<?php
add_filter( 'searchwp_indexer_comment', function( $comment ) {
// TODO: manipulate the $comment object in any way you see fit
// @link https://developer.wordpress.org/reference/classes/wp_comment/
return $comment;
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$comment Object

The comment being indexed

[wpforms id="3080"]