gplx/mediawiki/extensions/SemanticMediaWiki/docs/technical/hooks/hook.revisionguard.changere...

823 B

  • Since: 3.1
  • Description: Hook allows to forcibly change the revision ID as in case of the Factbox when building the content.
  • Reference class: RevisionGuard.php

If you do alter a revision, please log the event and make it visible to a user (or administrator) that it was changed.

Signature

use MediaWiki\MediaWikiServices;

MediaWikiServices::getInstance()->getHookContainer()->register( 'SMW::RevisionGuard::ChangeRevisionID', function( $title, &$latestRevID ) {

	// Set a revision ID
	// $latestRevID = 42;
} );

See also