Manual:Hooks/DisplayOldSubtitle

From MediaWiki.org
Jump to navigation Jump to search
DisplayOldSubtitle
Available from version 1.8.0
Allows extensions to modify the displaying of links to other revisions when browsing through revisions.
Define function:
public static function onDisplayOldSubtitle( $article, $oldid ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"DisplayOldSubtitle": "MyExtensionHooks::onDisplayOldSubtitle"
	}
}

For MediaWiki ≤1.25:

$wgHooks['DisplayOldSubtitle'][] = 'MyExtensionHooks::onDisplayOldSubtitle';
Called from:File(s): Article.php

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

Details[edit]

  • $article - The article object.
  • $oldid - The id of the revision to show.