Extension:BetaFeatures

The BetaFeatures extension allows other MediaWiki extensions to register beta features with the list of user preferences on the wiki. It uses the existing user preferences architecture and a few special pages to accomplish its function.

Installing BetaFeatures
There's a major caveat to the usual installation instructions: BetaFeatures is something other extensions can depend on, and any extensions that do should be loaded _after_ BetaFeatures, in LocalSettings.php. So after you get a copy of BetaFeatures, you should be sure that your require_once calls are in the proper order.

Using the new hooks in your extension
Using this extension to support your beta feature is easy. Register a hook of type "GetBetaFeaturePreferences" in your extension's main file - the syntax is almost identical to the GetPreferences hook, with small changes to support the type of preference we need in this case.

Then, you can use the convenience function provided by BetaFeatures to check whether the feature is enabled.

Because the BetaFeatures class should be present everywhere, you could use the convenience function in any hook, special page, or anything else you wanted. Just be aware of potential performance or caching issues you may introduce with those changes.

Getting the latest version
The latest work in BetaFeatures relies on some core patches. So, in your core clone, run these commands:

Then, pull the latest BetaFeatures work in from Gerrit.

Once those are done, you have the latest work that User:MarkTraceur has been doing on the project.