/** * @FIXME This is terrible */ public static function onExtensionFunctions() { global $wgHooks; // Register this as late as possible! $wgHooks['GetPreferences'][] = 'GlobalPreferencesHooks::onGetPreferences'; }
This will work only until there's another extension that wants to be the last. We should probably introduce another hook that would allow to process already fully built preferences array.