searchwp\query\result\load_data
4.0.0以降
検索結果に適用可能なエントリー属性データをSearchWPがロードするかどうかを制御します。
注意: この機能が有効な場合、エンジンに追加された属性データのみがロードされます。また、searchwp\query\result\load_data\all_attributesも参照してください。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ブール値 | $enabled |
false |
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 | |
| // Load Source Attribute data for SearchWP search results. | |
| add_filter( 'searchwp\query\result\load_data', function( $enabled, $args ) { | |
| return true; | |
| }, 30, 2 ); |

