searchwp\query\args
Seit: 4.0.0
Passen Sie die Argumente für eine \SearchWP\Query an, die zum Ausführen aller Suchanfragen verwendet wird.
Parameter
| Typ | Parameter | Standard | Seit | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Array |
$args
|
4.0.0 |
|||||||||||||||||||||||||
| \SearchWP\Query | $query |
Die ausgeführte Abfrage | 4.0.0 |
||||||||||||||||||||||||
Beispiele
All hooks should be added to your custom SearchWP Customizations Plugin.
Passen Sie die für eine Abfrage verwendete Engine an
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 | |
| // Customize the Engine used for a SearchWP Query. | |
| add_filter( 'searchwp\query\args', function( $args, $query ) { | |
| $args['engine'] = 'supplemental'; // Engine name. | |
| return $args; | |
| }, 20, 2 ); |

