mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 23:50:30 +00:00
Add hook that allows suppression of the talk page overlay
The hook lets us hand off the decision of whether to suppress this to DiscussionTools, which has a slightly complex set of feature-tests to do before deciding. It seems better to leave this disabled only when DT will actually be stepping in. Bug: T280051 Change-Id: If6b70fb6d801ac04fa3b70c153a2136d2e302f28
This commit is contained in:
parent
18329d800a
commit
5fb7c116b7
|
@ -484,6 +484,12 @@ class SkinMinerva extends SkinMustache {
|
|||
private function isTalkPageWithViewAction() {
|
||||
$title = $this->getTitle();
|
||||
|
||||
// Hook is @unstable and only for use by DiscussionTools. Do not use for any other purpose.
|
||||
$hookContainer = MediaWikiServices::getInstance()->getHookContainer();
|
||||
if ( !$hookContainer->run( 'MinervaNeueTalkPageOverlay', [ $title, $this->getOutput() ] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $title->isTalkPage() && Action::getActionName( $this->getContext() ) === "view";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue