Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use a custom rich text file parser to extract content in SearchWP
<?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