Manual:Hooks/EditPageCopyrightWarning

From Linux Web Expert

EditPageCopyrightWarning
<translate> Available from <tvar name=1><translate> version <tvar (r52361, codereview)</tvar></translate>
Allow for site and per-namespace customization of contribution/copyright notice.
<translate> Define function:</translate>
public static function onEditPageCopyrightWarning( $title, &$msg ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"EditPageCopyrightWarning": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageCopyrightWarning"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> EditPage.php
<translate> Interface:</translate> EditPageCopyrightWarningHook.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:EditPageCopyrightWarning extensions</tvar>.</translate>


Details

  • $title: title of page being edited
  • &$msg: localization message name, overridable. Default is either 'copyrightwarning' or 'copyrightwarning2'