Available since: 2.8.8
searchwp_pre_set_post
View Parameters »When indexing, SearchWP creates a reference to each post as it is indexed. Using this hook you can modify any number of entries prior to getting indexed. This hook is run for each entry prior to it being indexed.
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 | |
// Modify post(s) before SearchWP indexes them. | |
add_filter( 'searchwp_pre_set_post', function( $the_post ) { | |
// TODO: Modify $the_post in any way you see fit. | |
return $the_post; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$the_post |
Object |
Entry being indexed |