Manual:Hooks/EditPageBeforeEditChecks

From Linux Web Expert

EditPageBeforeEditChecks
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 374870)</tvar></translate>
Allows modifying the edit checks below the textarea in the edit form
<translate> Define function:</translate>
public static function onEditPageBeforeEditChecks( EditPage &$editpage, array &$checks, &$tabindex ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"EditPageBeforeEditChecks": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageBeforeEditChecks"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> EditPage.php
<translate> Interface:</translate> EditPageBeforeEditChecksHook.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:EditPageBeforeEditChecks extensions</tvar>.</translate>


Details

  • &$editpage: The current EditPage object
  • &$checks: Array of edit checks like "watch this page"/"minor edit"
  • &$tabindex: HTML tabindex of the last edit check/button