Available from version 1.10.0
When a history page list is about to be constructed.
Define function:
public static function onPageHistoryBeforeList( Page $article, IContextSource $context ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"PageHistoryBeforeList": "MyExtensionHooks::onPageHistoryBeforeList"

For MediaWiki ‚ȧ1.25:

$wgHooks['PageHistoryBeforeList'][] = 'MyExtensionHooks::onPageHistoryBeforeList';
Called from:File(s): actions/HistoryAction.php
Function(s): onView

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


  • $article: A Page instance, the article that the history is loading for
  • $context: IContextSource instance (introduced¬†in 1.21) (Gerrit change 53603)