searchwp\source\post\attributes\meta\ignored
Da: 4.0.0
Indice
Per impostazione predefinita, SearchWP ignora le chiavi meta che non contengono contenuti degni di ricerca. Puoi personalizzare quali chiavi vengono ignorate con questo hook.
Parametri
| Tipo | Parametro | Predefinito | Da | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Array | $meta_keys |
Chiavi meta interne utilizzate sia da WordPress che da SearchWP che non contengono contenuti utili | 4.0.0 |
||||||
| Array |
$args
|
4.0.0 |
|||||||
Esempi
All hooks should be added to your custom SearchWP Customizations Plugin.
Ignora chiavi meta aggiuntive
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 | |
| // Ignore additional meta keys in SearchWP. | |
| add_filter( | |
| 'searchwp\source\post\attributes\meta\ignored', | |
| function( $meta_keys, $args ) { | |
| $meta_keys[] = 'my_not_useful_meta_key'; | |
| return $meta_keys; | |
| }, | |
| 20, 2 | |
| ); |

