searchwp\parser\pdf
Da: 4.0.0
Indice
Utilizza un parser PDF esterno per estrarre il contenuto PDF invece di quello di SearchWP.
Parametri
| Tipo | Parametro | Predefinito | Da | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Stringa | $content |
'' |
4.0.0 |
|||||||||
| Array |
$args
|
4.0.0 |
||||||||||
Esempi
Tutti gli hook dovrebbero essere aggiunti al tuo plugin personalizzato SearchWP Customizations Plugin.
Utilizza un parser PDF personalizzato per estrarre il contenuto del PDF
| <?php | |
| // Use a custom PDF content parser to extract PDF content in SearchWP. | |
| add_filter( 'searchwp\parser\pdf', function( $content, $data ) { | |
| $my_parser = new \MyPdfParser( $data['file'] ); | |
| return $my_parser->text(); | |
| }, 20, 2 ); |

