Merge "Add hook that allows suppression of the talk page overlay"

This commit is contained in:
jenkins-bot 2021-06-10 20:35:20 +00:00 committed by Gerrit Code Review
commit f21558f313

View file

@ -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";
}