searchwp\query\logic\and
4.0.0以降
ANDロジックが実行されるかどうかを制御します。
注意: デフォルトでは、トークンしきい値を超えた場合、ANDロジックはスキップされます。デフォルトのしきい値は5ですが、searchwp\query\logic\and\token_thresholdフックでカスタマイズできます。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 |
|---|---|---|---|
| ブール値 | $enabled |
true |
4.0.0 |
| \SearchWP\Query | $query |
実行中のクエリ | 4.0.0 |
例
All hooks should be added to your custom SearchWP Customizations Plugin.
ANDロジックを無効にする
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 | |
| // Disable AND logic in SearchWP. | |
| add_filter( 'searchwp\query\logic\and', function( $enabled, $query ) { | |
| return false; | |
| }, 30, 2 ); |

