On Mon, Sep 30, 2013 at 09:27:29PM +0000, Amelia Ireland wrote:
I've already used this method with one of the extensions. Is there anything on the backend / PHP side so that I can advantage of ResourceLoader script compression? It seems like it should be possible, but I don't have a thorough-enough knowledge of the innards of Mediawiki, and I can't find anything in the docs on this topic.
As long as you know that the extension is enabled before the page loads or the user takes any actions, you can simply find out where the modules are added to the OutputPage (look/grep for "addModules") and wrap it in an appropriate if statement/block. I don't think ResourceLoader itself has any nice methods to do this for you, but I also don't think it's a particularly useful feature, given the ease with which developers can do it themselves...