2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Api\Hook;
|
|
|
|
|
|
|
|
|
|
/**
|
2020-03-16 23:31:05 +00:00
|
|
|
* @deprecated since 1.24 Use ApiQueryTokensRegisterTypes instead.
|
2020-03-03 22:50:34 +00:00
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface APIQueryRecentChangesTokensHook {
|
|
|
|
|
/**
|
|
|
|
|
* Use this hook to add custom tokens to list=recentchanges. Every token has an
|
|
|
|
|
* action, which will be used in the rctoken parameter and in the output
|
|
|
|
|
* (actiontoken="..."), and a callback function which should return the token, or
|
|
|
|
|
* false if the user isn't allowed to obtain it. The prototype of the callback
|
|
|
|
|
* function is func($pageid, $title, $rc), where $pageid is the page ID of the
|
|
|
|
|
* page associated to the revision the token is requested for, $title the
|
|
|
|
|
* associated Title object and $rc the associated RecentChange object. In the
|
2020-03-16 23:31:05 +00:00
|
|
|
* hook, add your callback to the $tokenFunctions array and return true
|
2020-03-03 22:50:34 +00:00
|
|
|
* (returning false makes no sense).
|
|
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param array &$tokenFunctions [ action => callback ]
|
|
|
|
|
* @return bool|void True or no return value
|
2020-03-03 22:50:34 +00:00
|
|
|
*/
|
|
|
|
|
public function onAPIQueryRecentChangesTokens( &$tokenFunctions );
|
|
|
|
|
}
|