searchwp\query\args
4.0.0以降
すべての検索クエリを実行するために使用される\SearchWP\Queryの引数をカスタマイズします。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 配列 |
$args
|
4.0.0 |
|||||||||||||||||||||||||
| \SearchWP\Query | $query |
実行中のクエリ | 4.0.0 |
||||||||||||||||||||||||
例
All hooks should be added to your custom SearchWP Customizations Plugin.
クエリに使用するエンジンをカスタマイズします
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 ); |

