Template:MediaWikiHook

From MediaWiki.org
Jump to: navigation, search
[edit] [purge] Template documentation

[edit] Copy and paste template

fnMyHook
Available from version ???


*Define function:
function fnMyHook( $x, $y ) { ... }

*Attach hook:
$wgHooks['fnMyHook'][] = 'MyExtensionHooks::someExample';
Called from:

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

{{MediaWikiHook
|name = fnMyHook
|summary = 
|version = 
|rev = 
|removed = 
|deprecated =
|args = $x, $y
|source = 
|templatemode=
}}

[edit] Usage notes

name
The name of the hook. This is usually the same name as the sub-page.
summary
A short description of the hook's purpose.
More detailed descriptions are desirable, and should be added to the main page content.
If you update the short description, please also update the two tables on Manual:Hooks.
version
The version of MediaWiki this hook was first introduced in.
rev
SVN revision in which this hook was first introduced. If this parameter is given, it'll link to the appropriate CodeReview page (i.e. Special:Code/MediaWiki/1).
args
The arguments, as used at the top of the function.
source
A list of locations in the code that call this hook.
removed
If the hook has been removed, the version of MediaWiki that it was removed in.
deprecated
If the hook has been deprecated (but not removed), the version of MediaWiki that it was deprecated in.
templatemode
Set to nocats if hook documentation should not appear in standard MediaWiki Categories.
By default, using this temmplate places the documentation page into categories:
  • MediaWiki hooks
  • Hooks added in MediaWiki . . .
There are times when it is undesirable to automatically categorize the hook documentation. Examples would include when documenting a hook in an extension, or when documenting the template itself.
Language: English  • Deutsch • 日本語
The above documentation is transcluded from Template:MediaWikiHook/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Toolbox