Manual:Hooks/SearchResultInitFromTitle
SearchResultInitFromTitle | |
---|---|
Available from version 1.20.0 Set the revision used when displaying a page in search results. | |
Define function: | public static function onSearchResultInitFromTitle( Title title, &$id ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SearchResultInitFromTitle": "MediaWiki\\Extension\\MyExtension\\Hooks::onSearchResultInitFromTitle"
}
}
|
Called from: | File(s): SearchEngine.php |
Interface: | SearchResultInitFromTitleHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SearchResultInitFromTitle extensions.
Details
edit- $title : Current Title object being displayed in search results.
- &$id: Revision ID (default is false, for latest)