searchwp\parser\text
Da: 4.0.0
Indice
Utilizza un parser di testo esterno per estrarre il contenuto testuale invece di quello di SearchWP.
Parametri
| Tipo | Parametro | Predefinito | Da | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Stringa | $content |
'' |
4.0.0 |
|||||||||
| Array |
$args
|
4.0.0 |
||||||||||
Esempi
All hooks should be added to your custom SearchWP Customizations Plugin.
Usa un parser di testo personalizzato per estrarre il contenuto
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 text file parser to extract content in SearchWP. | |
| add_filter( 'searchwp\parser\text', function( $content, $data ) { | |
| $my_parser = new \MyTextParser( $data['file'] ); | |
| return $my_parser->text(); | |
| }, 20, 2 ); |

