Manual:Hooks/PageHistoryLineEnding
From Linux Web Expert
PageHistoryLineEnding | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> right before the end <li> is added to a history line. | |
<translate> Define function:</translate> | public static function onPageHistoryLineEnding( HistoryPager $history, &$row, string &$line, array &$classes, array &$attribs ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"PageHistoryLineEnding": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageHistoryLineEnding"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> actions/pagers/HistoryPager.php |
<translate> Interface:</translate> | PageHistoryLineEndingHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:PageHistoryLineEnding extensions</tvar>.</translate>
Details
$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).