Jump to content

Manual:Hooks/DifferenceEngineMarkPatrolledLink

From mediawiki.org
DifferenceEngineMarkPatrolledLink
Available from version 1.29.0 (Gerrit change 298026)
Allow extensions to change the markpatrolled link, which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a ‎<span> element which has class="patrollink".
Define function:
public static function onDifferenceEngineMarkPatrolledLink( DifferenceEngine $differenceEngine, string &$markAsPatrolledLink, int $rcid ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"DifferenceEngineMarkPatrolledLink": "MediaWiki\\Extension\\MyExtension\\Hooks::onDifferenceEngineMarkPatrolledLink"
	}
}
Called from: File(s): diff/DifferenceEngine.php
Function(s): markPatrolledLink
Interface: DifferenceEngineMarkPatrolledLinkHook.php

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


Details

[edit]
  • $differenceEngine: DifferenceEngine object
  • &$markAsPatrolledLink: The "mark as patrolled" link HTML (string)
  • $rcid: Recent change ID (rc_id) for this change (int)