< Manual:Hooks 
 
      | ShowSearchHitTitle | |
|---|---|
| Available from version 1.16.0 Customize display of search hit title/link. | |
| Define function: | public static function onShowSearchHitTitle( Title &$title, &$titleSnippet, SearchResult $result, $terms, SpecialSearch $specialSearch, array &$query, array &$attributes ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"ShowSearchHitTitle": "MyExtensionHooks::onShowSearchHitTitle"
	}
}
 | 
| Called from: | File(s): widget/search/FullSearchResultWidget.php | 
| Interface: | ShowSearchHitTitleHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ShowSearchHitTitle extensions.
Details
- &$title: Title to link to
- &$titleSnippet: Label for the link representing the search result. Typically the article title.
- $result: The SearchResult object
- $terms: String of the search terms entered
- $specialSearch: The SpecialSearch object
- &$query: Array of query string parameters for the link representing the search result.
- &$attributes: Array of title link attributes, can be modified by extension.
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.