Manual:Hooks/CodeEditorGetPageLanguage

From MediaWiki.org
Jump to: navigation, search
CodeEditorGetPageLanguage
Available from version ???
Hook provided for extensions to extend CodeEditor by supporting additional languages
Define function:
public static function onCodeEditorGetPageLanguage( $title, &$lang, $model, $format ) { ... }
Attach hook:
$wgHooks['CodeEditorGetPageLanguage'][] = 'MyExtensionHooks::onCodeEditorGetPageLanguage';
Called from: File(s): CodeEditor.hooks.php

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

Details[edit]

$title
Title for the page being edited
&$lang
Language the code is in (eg: javascript, css, json)
$model
Content model for the page being edited
$format
 ???