Manual:Hooks/ChangesListInsertArticleLink

From MediaWiki.org
Jump to navigation Jump to search
ChangesListInsertArticleLink
Available from version 1.12.0
Override or augment link to article in RC list.
Define function:
public static function onChangesListInsertArticleLink( &$changesList, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ChangesListInsertArticleLink": "MyExtensionHooks::onChangesListInsertArticleLink"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ChangesListInsertArticleLink'][] = 'MyExtensionHooks::onChangesListInsertArticleLink';
Called from:File(s): changes/ChangesList.php
Function(s): getArticleLink

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

Details[edit]

  • &$changesList: ChangesList instance.
  • &$articlelink: HTML of link to article (already filled-in).
  • &$s: HTML of row that is being constructed.
  • &$rc: RecentChange instance.
  • $unpatrolled: Whether or not we are showing unpatrolled changes.
  • $watched: Whether or not the change is watched by the user.