summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/WikiEditor.hooks.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/WikiEditor/WikiEditor.hooks.php')
-rw-r--r--extensions/WikiEditor/WikiEditor.hooks.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/extensions/WikiEditor/WikiEditor.hooks.php b/extensions/WikiEditor/WikiEditor.hooks.php
index 7a2c2e41..a840dc4b 100644
--- a/extensions/WikiEditor/WikiEditor.hooks.php
+++ b/extensions/WikiEditor/WikiEditor.hooks.php
@@ -29,6 +29,9 @@ class WikiEditorHooks {
'modules' => array(
'ext.wikiEditor.toolbar',
),
+ 'configurations' => array(
+ 'wgWikiEditorToolbarClickTracking',
+ ),
),
'dialogs' => array(
'preferences' => array(
@@ -214,6 +217,27 @@ class WikiEditorHooks {
}
/**
+ * EditPageBeforeEditToolbar hook
+ *
+ * Disable the old toolbar if the new one is enabled
+ *
+ * @param $toolbar html
+ * @return bool
+ */
+ public static function EditPageBeforeEditToolbar( &$toolbar ) {
+ if ( self::isEnabled( 'toolbar' ) ) {
+ $toolbar = Html::rawElement(
+ 'div', array(
+ 'class' => 'wikiEditor-oldToolbar',
+ 'style' => 'display:none;'
+ ),
+ $toolbar
+ );
+ }
+ return true;
+ }
+
+ /**
* GetPreferences hook
*
* Adds WikiEditor-releated items to the preferences