useCodeEditor = $config->get( 'ScribuntoUseCodeEditor' ); } /** * @param Title $title * @param string|null &$languageCode * @param string $model * @param string $format * @return bool */ public function onCodeEditorGetPageLanguage( Title $title, ?string &$languageCode, string $model, string $format ) { if ( $this->useCodeEditor && $title->hasContentModel( CONTENT_MODEL_SCRIBUNTO ) ) { $engine = Scribunto::newDefaultEngine(); if ( $engine->getCodeEditorLanguage() ) { $languageCode = $engine->getCodeEditorLanguage(); return false; } } return true; } }