Module:Protection banner/doc: Difference between revisions

Content deleted Content added
No edit summary
Usage: deprecate expiry
Line 15:
| small = ''yes/no''
| action = ''action''
| expiry = ''expiry'' (only for action = 'autoreview')
| date = ''protection date''
| user = ''username''
Line 22 ⟶ 21:
}}
 
The #invoke syntax can be used for creating protection templates more specific than {{tl|pp}}. For example, it is possible to create a protection template which always shows a padlock icon by using the code <code><nowiki>{{#invoke:Protection banner|main|small=yes}}</nowiki></code>. Pages which call this template will still be able to use other arguments, like ''action'' and ''expiry''. However, this only works one level deep; a page calling a template which calls another template containing the above code will not automatically be able to use parameters like ''action'' and ''expiry''.
 
'''''Note:''' You needshould tono longer specify the expiry only for pending changes, i.e. action = 'autoreview', as it is automatically retrieved in otherall cases.''
 
=== From Lua ===