SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.5

searchwp_pdf_metadata

View Parameters »

Note: Use of this hook will require a manual reindex

When possible, SearchWP will index metadata from PDFs. You can use this hook to modify that metadata before SearchWP indexes it. In order for SearchWP to index PDF metadata, Media must be added to an engine and PDF Metadata added to Media (which is different than Document Content)

<?php
// Modify PDF metadata before it gets indexed in SearchWP.
add_filter( 'searchwp_pdf_metadata', function( $pdf_metadata, $post_id ) {
// TODO: Modify $pdf_metadata as you see fit.
return $pdf_metadata;
}, 20, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$pdf_metadata Array

PDF metadata to index

$post_id Integer

ID of entry being indexed

[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]