Manual:Hooks/SpecialWatchlistGetNonRevisionTypes

From Linux Web Expert

Revision as of 15:12, 3 March 2021 by imported>Baris6161TURK
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SpecialWatchlistGetNonRevisionTypes
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Allows extensions to register the value they have inserted to rc_type field of recentchanges for non-revision changes so they can be included in the watchlist.
<translate> Define function:</translate>
public static function onSpecialWatchlistGetNonRevisionTypes( array &$nonRevisionTypes ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialWatchlistGetNonRevisionTypes": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialWatchlistGetNonRevisionTypes"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specialpage/ChangesListSpecialPage.php, specials/SpecialWatchlist.php
<translate> Interface:</translate> SpecialWatchlistGetNonRevisionTypesHook.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:SpecialWatchlistGetNonRevisionTypes extensions</tvar>.</translate>


Details

  • &$nonRevisionTypes: array of integers matching the rc_type field of the recentchanges table.

See also