Output config var when VE disabled by hook

Currently we only disable the desktop init code when this hook
returns false, but other integrations may want to know about this,
e.g. MobileFrontend.

Bug: T174180
Change-Id: I0268239cc9ea2d397140e617fcb6e4e104a75f31
This commit is contained in:
Ed Sanders 2023-05-25 17:22:21 +01:00 committed by Bartosz Dziewoński
parent f6994eafe4
commit fe14ffb76b

View file

@ -87,6 +87,7 @@ class Hooks {
$services = MediaWikiServices::getInstance();
$hookRunner = new VisualEditorHookRunner( $services->getHookContainer() );
if ( !$hookRunner->onVisualEditorBeforeEditor( $output, $skin ) ) {
$output->addJsConfigVars( 'wgVisualEditorDisabledByHook', true );
return;
}
if ( !(