Manual:Hooks/EnhancedChangesList::getLogText

From MediaWiki.org
Jump to navigation Jump to search
EnhancedChangesList::getLogText
Available from version 1.25.0 (Gerrit change 193091)
allows altering, removing or adding to the links of a group of changes in EnhancedChangesList.
Define function:
public static function onEnhancedChangesList_getLogText( EnhancedChangesList $changesList, array &$links, array $cachedEntries ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"EnhancedChangesList::getLogText": "MyExtensionHooks::onEnhancedChangesListgetLogText"
	}
}

For MediaWiki ≤1.25:

$wgHooks['EnhancedChangesList::getLogText'][] = 'MyExtensionHooks::onEnhancedChangesListgetLogText';
Called from:File(s): changes/EnhancedChangesList.php
Function(s): getLogText

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

Details[edit]

Hook subscribers can return false to omit this line from Special:RecentChanges.

  • $changesList: EnhancedChangesList object
  • &$links: The links that were generated by EnhancedChangesList
  • $cachedEntries: Array of RCCacheEntry objects