This Documentation is for SearchWP Version 3

Available since: 2.8


View Parameters »

Note: Use of this hook will require a manual reindex

This action receives any PDF metadata that’s been extracted by SearchWP, allowing to do with it what you wish.

add_action( 'searchwp_index_pdf_metadata', function( $pdf_metadata, $post_id ) {
// Perform additional processing of $pdf_metadata
}, 10, 2 );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$pdf_metadta Array

Keys and values will vary for each PDF

$post_id Integer

The post ID of the PDF from which the metadata was extracted