mediawiki-skins-Vector/VectorHooks.php
Umherirrender 1c0725da94 Rename file Hooks.php to match class
Change-Id: I59058d580d6b4ced5b7744c46baf074042467df7
2017-12-09 21:32:56 +01:00

30 lines
688 B
PHP

<?php
/**
* VectorHooks.php
*/
/**
* Hook handlers for Vector skin.
*
* Hook handler method names should be in the form of:
* on<HookName>()
*/
class VectorHooks {
/**
* BeforePageDisplayMobile hook handler
*
* Make Vector responsive when operating in mobile mode (useformat=mobile)
*
* @see https://www.mediawiki.org/wiki/Extension:MobileFrontend/BeforePageDisplayMobile
* @param OutputPage $out
* @param SkinTemplate $sk
*/
public static function onBeforePageDisplayMobile( OutputPage $out, $sk ) {
// This makes Vector behave in responsive mode when MobileFrontend is installed
if ( $sk instanceof SkinVector ) {
$sk->enableResponsiveMode();
}
}
}