Wikimedia Developer Support

How to add elements to core configuration settings in extension.json?

Some core configuration settings are arrays that allow extensions to add more elements. For example $wgActions, $wgLogNames, etc.

However, Manual:Extension registration doesn’t mention this, only documents how to add new configurations.

In some extensions, I’ve seen they resolve this by using the onRegistration hook and doing this by code. But is this actually possible to do with extension.json?

https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#Actions etc.

You are correct that the exact way of adding new values is not spelled out anywhere; it works the same way as for extension configuration (and as such it depends on the merge strategy used by that setting).

1 Like

Thanks! I missed that link from the page