diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /extensions/WikiEditor/WikiEditor.hooks.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'extensions/WikiEditor/WikiEditor.hooks.php')
-rw-r--r-- | extensions/WikiEditor/WikiEditor.hooks.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/extensions/WikiEditor/WikiEditor.hooks.php b/extensions/WikiEditor/WikiEditor.hooks.php index a840dc4b..682f7aa2 100644 --- a/extensions/WikiEditor/WikiEditor.hooks.php +++ b/extensions/WikiEditor/WikiEditor.hooks.php @@ -287,6 +287,8 @@ class WikiEditorHooks { if ( count( $configurations ) ) { $vars = array_merge( $vars, $configurations ); } + //expose magic words for use by the wikieditor toolbar + WikiEditorHooks::getMagicWords( $vars ); return true; } @@ -304,4 +306,27 @@ class WikiEditorHooks { $vars['wgWikiEditorEnabledModules'] = $enabledModules; return true; } + + /** + * Expose useful magic words which are used by the wikieditor toolbar + * @param $vars array + * @return bool + */ + private static function getMagicWords( &$vars ){ + $requiredMagicWords = array( + 'redirect', + 'img_right', + 'img_left', + 'img_none', + 'img_center', + 'img_thumbnail', + 'img_framed', + 'img_frameless', + ); + foreach ( $requiredMagicWords as $name ) { + $magicWords[$name] = MagicWord::get( $name )->getSynonym( 0 ); + } + $vars['wgWikiEditorMagicWords'] = $magicWords; + } + } |