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

889 B

  • Since: 3.1
  • Description: Hook to define whether a revision is approved or needs to be suppressed. For example, the latestRevID contains an ID that is not the revision that is approved an should not be used for the SemanticData representation during an update.
  • Reference class: RevisionGuard.php

Signature

use MediaWiki\MediaWikiServices;

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

	// If you need to decline an update (aka is not approved)
	// return false;

	return true;
} );

See also