The wikidata bridge should be configurable to use links pointing to different repo instances other than wikidata.org.
In JavaScript, this should be exported somewhere in mw.config, under a “data bridge”-specific name; for now, we only need to support a single repo here, though in general a client can be connected to more than one repo. The value could be either a regex matching the href, or an object containing that regex and also an api.php URL.
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