searchwp\source\post\attributes\meta\ignored
Seit: 4.0.0
Standardmäßig ignoriert SearchWP Metaschlüssel, die keine suchrelevanten Inhalte enthalten. Sie können mit diesem Hook anpassen, welche Schlüssel ignoriert werden.
Parameter
| Typ | Parameter | Standard | Seit | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Array | $meta_keys |
Interne Meta-Schlüssel, die sowohl von WordPress als auch von SearchWP verwendet werden und keine nützlichen Inhalte enthalten | 4.0.0 |
||||||
| Array |
$args
|
4.0.0 |
|||||||
Beispiele
All hooks should be added to your custom SearchWP Customizations Plugin.
Zusätzliche Meta-Schlüssel ignorieren
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 | |
| ); |

