From 60411b9a9fb873fd923ee64cb612fefd8dc9f2a3 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Tue, 29 Apr 2014 13:34:40 -0700 Subject: [PATCH] Convert VisualEditor Beta Feature to a normal (non-optional) plugin Change-Id: I0dd1c85ad92d7e42654e23b6237b30f8f4dfe0fa --- Math.hooks.php | 22 -- Math.php | 3 +- ...eatures-icon-VisualEditor-formulae-ltr.svg | 184 -------------- ...eatures-icon-VisualEditor-formulae-rtl.svg | 238 ------------------ 4 files changed, 1 insertion(+), 446 deletions(-) delete mode 100644 images/betafeatures-icon-VisualEditor-formulae-ltr.svg delete mode 100644 images/betafeatures-icon-VisualEditor-formulae-rtl.svg diff --git a/Math.hooks.php b/Math.hooks.php index 60eb2f0..cf20545 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -158,28 +158,6 @@ class MathHooks { return true; } - public static function onGetBetaPreferences( $user, &$preferences ) { - global $wgExtensionAssetsPath; - if ( class_exists( 'VisualEditorHooks' ) ) { - // Add beta feature if VisualEditor is installed - $dir = RequestContext::getMain()->getLanguage()->getDir(); - $preferences['math-enable-visualeditor'] = array( - 'version' => '1.0', - 'label-message' => 'math-preference-mwmathinspector-label', - 'desc-message' => 'math-preference-mwmathinspector-description', - 'screenshot' => $wgExtensionAssetsPath . - "/Math/images/betafeatures-icon-VisualEditor-formulae-$dir.svg", - 'info-message' => 'math-preference-mwmathinspector-info-link', - 'discussion-message' => 'math-preference-mwmathinspector-info-link', - 'requirements' => array( - 'betafeatures' => array( - 'visualeditor-enable', - ), - ), - ); - } - } - /** * List of message keys for the various math output settings. * diff --git a/Math.php b/Math.php index 34a0ef4..991d4bb 100644 --- a/Math.php +++ b/Math.php @@ -179,7 +179,6 @@ $wgMathDisableTexFilter = false; $wgExtensionFunctions[] = 'MathHooks::setup'; $wgHooks['ParserFirstCallInit'][] = 'MathHooks::onParserFirstCallInit'; -$wgHooks['GetBetaFeaturePreferences'][] = 'MathHooks::onGetBetaPreferences'; $wgHooks['GetPreferences'][] = 'MathHooks::onGetPreferences'; $wgHooks['LoadExtensionSchemaUpdates'][] = 'MathHooks::onLoadExtensionSchemaUpdates'; $wgHooks['ParserTestTables'][] = 'MathHooks::onParserTestTables'; @@ -469,4 +468,4 @@ $wgResourceModules['ext.math.visualEditor'] = array( 'targets' => array( 'desktop', 'mobile' ), ) + $moduleTemplate; -$wgVisualEditorPreferenceModules['math-enable-visualeditor'] = 'ext.math.visualEditor'; +$wgVisualEditorPluginModules[] = 'ext.math.visualEditor'; diff --git a/images/betafeatures-icon-VisualEditor-formulae-ltr.svg b/images/betafeatures-icon-VisualEditor-formulae-ltr.svg deleted file mode 100644 index 72d66ae..0000000 --- a/images/betafeatures-icon-VisualEditor-formulae-ltr.svg +++ /dev/null @@ -1,184 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/images/betafeatures-icon-VisualEditor-formulae-rtl.svg b/images/betafeatures-icon-VisualEditor-formulae-rtl.svg deleted file mode 100644 index 15a2aa9..0000000 --- a/images/betafeatures-icon-VisualEditor-formulae-rtl.svg +++ /dev/null @@ -1,238 +0,0 @@ - - - -image/svg+xml \ No newline at end of file