Manual:Hooks/ChangeTagsAfterUpdateTags

From Linux Web Expert

ChangeTagsAfterUpdateTags
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Can be used by extensions to take actions after change tags have been added or updated.
<translate> Define function:</translate>
public static function onChangeTagsAfterUpdateTags( $addedTags, $removedTags, $prevTags, $rc_id, $rev_id, $log_id, $params, $rc, $user ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ChangeTagsAfterUpdateTags": "MediaWiki\\Extension\\MyExtension\\Hooks::onChangeTagsAfterUpdateTags"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> ChangeTags.php
<translate> Interface:</translate> ChangeTagsAfterUpdateTagsHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ChangeTagsAfterUpdateTags extensions</tvar>.</translate>

Details

  • $addedTags: tags effectively added in the update
  • $removedTags: tags effectively removed in the update
  • $prevTags: tags that were present prior to the update
  • $rc_id: recentchanges table id
  • $rev_id: revision table id
  • $log_id: logging table id
  • $params: tag params
  • $rc: RecentChange being tagged when the tagging accompanies the action or null
  • $user: User who performed the tagging when the tagging is subsequent to the action or null

See also