searchwp\parser\pdf
4.0.0以降
SearchWPのPDFパーサーの代わりに、外部のPDFパーサーを使用してPDFコンテンツを抽出します。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 文字列 | $content |
'' |
4.0.0 |
|||||||||
| 配列 |
$args
|
4.0.0 |
||||||||||
例
All hooks should be added to your custom SearchWP Customizations Plugin.
PDFコンテンツを抽出するためにカスタムPDFコンテンツパーサーを使用する
This file contains hidden or 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 | |
| // 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 ); |

