Manual:Hooks/PageHistoryLineEnding

PageHistoryLineEnding
Available from version 1.10.0
right before the end <li> is added to a history line.
Define function:
public static function onPageHistoryLineEnding( HistoryPager $history, &$row, string &$line, array &$classes, array &$attribs ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"PageHistoryLineEnding": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageHistoryLineEnding"
	}
}
Called from: File(s): actions/pagers/HistoryPager.php
Interface: PageHistoryLineEndingHook.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 HistoryPager object
  • &$row: the revision row for this line
  • &$line: the HTML string representing this parsed line
  • &$classes: CSS classes to apply
  • &$attribs: associative array of other HTML attributes for the <li> element. Currently only data attributes reserved to MediaWiki are allowed (see Sanitizer::isReservedDataAttribute).

See also

edit