In PreferencesHookHandler::onGetPreferences():
// Hide RC/wL prefs if enhanced filters are enabled $context = new DerivativeContext( RequestContext::getMain() ); $context->setUser( $user ); $context->setRequest( new DerivativeRequest( $context->getRequest(), [] ) ); $rcFiltersEnabled = Hooks::isRCStructuredUiEnabled( $context ); // HACK: Note that this only hides the preferences on the preferences page, // it does not cause them to behave as if they're set to their default value, // because this hook only runs on the preferences page. if ( $rcFiltersEnabled ) { $wgHiddenPrefs[] = 'ores-damaging-flag-rc'; }
That's really evil. There has to be a better way to do this.