SkinTemplateOutputPageBeforeExec should be fine for this but extension loading may interfere.
It's used in WikimediaMessages extension to add the developers and cookie statement links to the footer. https://github.com/wikimedia/mediawiki-extensions-WikimediaMessages/blob/mas... You can restrict to just mobile by wrapping the hook in the if statement: $context= MobileContext::singleton(); if ($context->shouldDisplayMobileView() ) { // add links }
However... this hook needs to be registered after MobileFrontend installs its own hooks. Last time I checked (but didn't verify) pasting into LocalSettings.php caused the hook to register after MobileFrontend (which loads via extension loading). I'm not sure if this is a known bug or a workaround exists.
On Mon, Aug 1, 2016 at 2:22 AM, Sam Smith samsmith@wikimedia.org wrote:
On Fri, Jul 29, 2016 at 11:22 PM, Bryan Davis bd808@wikimedia.org wrote:
It would be a nice thing for someone to document this hook on mediawiki.org. It seems that there are several hooks for MobileFrontend that are currently undocumented [3].
Duly Phabricated! [0]
-Sam
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l