Extension:ContentTranslation/Hooks/SectionTranslationBeforePublish

From Linux Web Expert

SectionTranslationBeforePublish
Available from version ???
This hook is executed in the ApiSectionTranslationPublish before a publish attempt.
Define function:
public static function onSectionTranslationBeforePublish( MediaWiki\Title\Title $title, string $language, User $user ) { ... }
Attach hook:
$wgHooks['SectionTranslationBeforePublish'][] = 'MyExtensionHooks::onSectionTranslationBeforePublish';
Called from:File(s): ContentTranslation /

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

ApiSectionTranslationPublish will wait for implementations of this hook to complete before returning a response, so if the implementation needs to do something time-consuming that does not need to be sent back with the response, consider using a DeferredUpdate or Job.