mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-25 06:14:04 +00:00
cdad0cc260
isFeatureEnabledForOutput already checks if the mobile flag is enabled, but it also respects the dtenable=1 override. Change-Id: I95035281bf301b22c1a9ef4c06ec54cdd0cbc85c
27 lines
581 B
PHP
27 lines
581 B
PHP
<?php
|
|
/**
|
|
* DiscussionTools mobile hooks
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @license MIT
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Hooks;
|
|
|
|
class MobileHooks {
|
|
/**
|
|
* Decide whether mobile frontend should be allowed to activate
|
|
*
|
|
* @param \Title $title
|
|
* @param \OutputPage $output
|
|
* @return bool|void This hook can return false to abort, causing the talk overlay to not be shown
|
|
*/
|
|
public static function onMinervaNeueTalkPageOverlay( $title, $output ) {
|
|
if ( HookUtils::isFeatureEnabledForOutput( $output ) ) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|