Manual:Hooks/ShowSearchHitTitle

From MediaWiki.org
Jump to: navigation, search
ShowSearchHitTitle
Available from version 1.16.0
Customise display of search hit title/link.

Define function:
public static function onShowSearchHitTitle( &$title, &$text, $result, $terms, $page ) { ... }

Attach hook:
$wgHooks['ShowSearchHitTitle'][] = 'MyExtensionHooks::onShowSearchHitTitle';
Called from: SpecialSearch.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ShowSearchHitTitle extensions.


[edit] Details

  • &$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.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox