Manual:Hooks/ChangeTagAfterDelete

ChangeTagAfterDelete
Available from version 1.25.0
Called after a change tag has been deleted (that is, removed from all revisions and log entries to which it was applied).
Define function:
public static function onChangeTagAfterDelete( $tag, Status &$status ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ChangeTagAfterDelete": "MediaWiki\\Extension\\MyExtension\\Hooks::onChangeTagAfterDelete"
	}
}
Called from: File(s): ChangeTags.php
Interface: ChangeTagAfterDeleteHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ChangeTagAfterDelete extensions.

Details

edit
  • $tag: Name of the tag.
  • &$status: Status object. Add warnings to this as required. There is no point setting errors, as the deletion has already been partly carried out by this point.

Notes

edit

This hook is called after a change tag has been deleted (that is, removed from all revisions and log entries to which it was applied). This gives extensions a chance to take it off their books.

Implementation of this hook is normally accompanied by an implementation of ChangeTagCanDelete.

See also

edit