searchwp\query\do_source_db_where
4.0.0以降
SearchWP がソースの db_where() 条件を考慮するかどうかを制御します。
この機能は、SearchWP のインデクサーがキャプチャできなかった方法で行われたコンテンツ編集に対する保護レイヤーを追加します。
使用しているソースによってキャプチャされた API を介してコンテンツ編集がすべて行われていると確信している場合は、この追加チェックを省略して、データベース呼び出しを節約し、パフォーマンスを向上させることができます。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 |
|---|---|---|---|
| ブール値 | $enabled |
true |
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 | |
| // Disable Source database table conditions in SearchWP. | |
| add_filter( 'searchwp\query\do_source_db_where', function( $enabled, $query ) { | |
| return false; | |
| }, 30, 2 ); |

