The wikidata bridge should be configurable to use links pointing to different repo instances other than wikidata.org.
In PHP, this should ideally work “out of the box” based on the information the client already has about the repo, though it might also be useful to be able to override this via LocalSettings.php (somewhere in $wgWBClientSettings, presumably).
Patch-For-Review: there are two independent chains implementing this, with different approaches. Either one can be merged. (Ignore all of @gerritbot’s comments below, due to change renames and abandonments they’ll just be very confusing.)
- add setting in BeforePageDisplayHandler, where the module is also loaded
- add setting as separate ResourceLoader module, and load this and the init module only if data bridge is enabled – now in T226982: Only make data bridge ResourceLoader modules available if data bridge is enabled