MediaWiki master
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
onChangeTagCanDelete ( $tag, $user, &$status) | |
Use this hook to tell whether a change tag should be able to be deleted from the UI (Special:Tags) or via the API. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ChangeTagCanDelete" to register handlers implementing this interface.
Definition at line 15 of file ChangeTagCanDeleteHook.php.
MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook::onChangeTagCanDelete | ( | $tag, | |
$user, | |||
& | $status ) |
Use this hook to tell whether a change tag should be able to be deleted from the UI (Special:Tags) or via the API.
The default is that tags defined using the ListDefinedTags hook are not allowed to be deleted unless specifically allowed. Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions.
string | $tag | Name of the tag |
User | null | $user | User initiating the action |
Status | &$status | To allow deletion of the tag, set $status = Status::newGood() , and then return false from the hook function. |
Implemented in MediaWiki\HookContainer\HookRunner.