Manual:Hooks/PageHistoryLineEnding

From MediaWiki.org
Jump to: navigation, search
PageHistoryLineEnding
Available from version 1.10.0
right before the end <li> is added to a history line.
Define function:
public static function onPageHistoryLineEnding( $history, &$row, &$s, &$classes ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"PageHistoryLineEnding": [
			"MyExtensionHooks::onPageHistoryLineEnding"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['PageHistoryLineEnding'][] = 'MyExtensionHooks::onPageHistoryLineEnding';
Called from: File(s): HistoryPage.php

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

Details[edit]

  • $history: the calling HistoryPager object
  • &$row: the revision row for this line
  • &$s: the string representing this parsed line
  • &$classes: css classes to apply