Created
March 26, 2020 17:03
-
-
Save jchristopher/b5359c83af889ba0425d8b16e009fc94 to your computer and use it in GitHub Desktop.
Use a custom rich text file parser to extract content in SearchWP
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 | |
// Use a custom rich text file parser to extract content in SearchWP. | |
add_filter( 'searchwp\parser\text', function( $content, $data ) { | |
$my_parser = new \MyRichTextParser( $data['file'] ); | |
return $my_parser->text(); | |
}, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment