searchwp\query\partial_matches\force
4.0.0以降
結果が見つかった場合でも、SearchWP に部分一致ロジックを実行するように強制します。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ブール値 | $force |
false |
4.0.0 |
|||||||||
| 配列 |
$args
|
4.0.0 |
||||||||||
例
すべてのフックはカスタムのSearchWP カスタマイズプラグインに追加する必要があります。
部分一致ロジックを強制する
デフォルトでは、一致が見つかった場合、部分一致ロジックは適用されませんが、強制することができます。
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 | |
| // Force partial matches in SearchWP even when matches are found using provided search. | |
| add_filter( 'searchwp\query\partial_matches\force', function( $force, $args ) { | |
| return true; | |
| }, 10, 2 ); |

