searchwp\query\results
4.0.0以降
SearchWPが見つけた結果を変更します。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 |
|---|---|---|---|
| 配列 | $results |
クエリの結果 | 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 | |
| // Customize the results returned by SearchWP. | |
| add_filter( 'searchwp\query\results', function( $results, $query ) { | |
| // This is where you can manipulate the $results array of results. | |
| return $results; | |
| }, 30, 2 ); |

