'ShowSearchHitTitle': Customise display of search hit title/link.
&$title: Title to link to
-&$text: Text to use for the link
-$result: The search result
-$terms: The search terms entered
-$page: The SpecialSearch object
-&$query: Query string to be appended to the link
+&$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.
'SidebarBeforeOutput': Allows to edit sidebar just before it is output by skins.
Warning: This hook is run on each display. You should consider to use
// clone to prevent hook from changing the title stored inside $result
$title = clone $result->getTitle();
- $queryString = [];
+ $query = [];
Hooks::run( 'ShowSearchHitTitle',
- [ &$title, &$snippet, $result, $terms, $this->specialPage, &$queryString ] );
+ [ &$title, &$snippet, $result, $terms, $this->specialPage, &$query ] );
$link = $this->linkRenderer->makeLink(
$title,
$snippet,
[ 'data-serp-pos' => $position ],
- $queryString
+ $query
);
return $link;