searchwp\query\args
Since: 4.0.0
Table of Contents
Customize the arguments for a \SearchWP\Query which is used to perform all search queries.
Parameters
| Type | Parameter | Default | Since | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Array |
$args
|
4.0.0 |
|||||||||||||||||||||||||
| \SearchWP\Query | $query |
The Query being run | 4.0.0 |
||||||||||||||||||||||||
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Customize the Engine used for a Query
| <?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 ); |

