746 B
746 B
- Since: 3.1
- Description: Hook allows to forcibly change the file version used.
- Reference class:
RevisionGuard.php
If you do alter a file, 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::ChangeFile', function( $title, &$file ) {
// $file = ...;
return true;
} );
See also
- See the
SemanticApprovedRevsextension for how to use the hook