Manual:Hooks/DifferenceEngineMarkPatrolledLink

From MediaWiki.org
Jump to navigation Jump to search
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": "MyExtensionHooks::onDifferenceEngineMarkPatrolledLink"
	}
}

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineMarkPatrolledLink'][] = 'MyExtensionHooks::onDifferenceEngineMarkPatrolledLink';
Called from:File(s): diff/DifferenceEngine.php
Function(s): markPatrolledLink

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)