searchwp\query\args
Desde: 4.0.0
Sumário
Personalize os argumentos para um \SearchWP\Query que é usado para executar todas as consultas de pesquisa.
Parâmetros
| Tipo | Parâmetro | Padrão | Desde | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Array |
$args
|
4.0.0 |
|||||||||||||||||||||||||
| \SearchWP\Query | $query |
A consulta que está sendo executada | 4.0.0 |
||||||||||||||||||||||||
Exemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Personalize o motor usado para uma consulta
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 ); |

