From fe14ffb76bcd86632cd23aa0480ca2fff45abfce Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Thu, 25 May 2023 17:22:21 +0100 Subject: [PATCH] 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 --- includes/Hooks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/Hooks.php b/includes/Hooks.php index 3dd29bffcf..abfddf1d88 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -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 ( !(