889 B
889 B
- Since: 3.1
- Description: Hook to define whether a revision is approved or needs to be suppressed. For example, the
latestRevIDcontains an ID that is not the revision that is approved an should not be used for theSemanticDatarepresentation 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
- See the
SemanticApprovedRevsextension for how to use the hook