searchwp\parser\richtext
Desde: 4.0.0
Sumário
Utilize um analisador de rich text externo para extrair conteúdo de rich text em vez do SearchWP.
Parâmetros
| Tipo | Parâmetro | Padrão | Desde | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String | $content |
'' |
4.0.0 |
|||||||||
| Array |
$args
|
4.0.0 |
||||||||||
Exemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Use um analisador de arquivo rich text personalizado para extrair conteúdo
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 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 ); |

