searchwp\query\partial_matches\minimum_length
4.0.0以降
部分一致の最小長を制御します。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 整数 | $length |
3 (searchwp\tokens\minimum_length はこのフックより前に適用されます) |
4.0.0 |
|||||||||
| 配列 |
$args
|
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 minimum length of partial match tokens in SearchWP. | |
| add_filter( 'searchwp\query\partial_matches\minimum_length', function( $length, $args ) { | |
| return 5; | |
| }, 20, 2 ); |

