wiki.techinc.nl/includes/skins/Hook/GetNewMessagesAlertHook.php
DannyS712 40eda16b0e Remove deprecated talk page message handling in User class
Most needed for moving forward with the removal of uses
of the Revision class, and remove User::getNewtalk at
the same time to be consistent. All of this code was
already hard deprecated in 1.35.

- User::getNewtalk
- User::getNewMessageLinks (could return Revision objects)
- UserRetrieveNewTalks hook (could return Revision objects)
- User::getNewMessageRevisionId (used ::getNewMessageLinks)
- User::setNewtalk (accepted Revision object parameters)

Bug: T247143
Bug: T277511
Change-Id: Ib4fd1e4cbc5ba1497658190b6c6ea3c6a5dc97f0
2021-05-04 19:21:06 +00:00

33 lines
1 KiB
PHP

<?php
namespace MediaWiki\Hook;
use OutputPage;
use User;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "GetNewMessagesAlert" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface GetNewMessagesAlertHook {
/**
* Use this hook to disable or modify the new messages alert.
*
* @since 1.35
*
* @param string &$newMessagesAlert Empty string by default. If the user has new talk page
* messages, this should be populated with an alert message to that effect.
* @param array $newtalks Empty array if the user has no new messages, or an array
* containing links and revisions if there are new messages. (See
* Skin::getNewtalks().)
* @param User $user User who is loading the page
* @param OutputPage $out To check what type of page the user is on
* @return bool|void True or no return value to continue or false to abort
*/
public function onGetNewMessagesAlert( &$newMessagesAlert, $newtalks, $user,
$out
);
}