Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template:Parameter

{{{1}}}
({{{2}}}) (required) {{{3}}}
Default: None

Description

This template is for standardizing how parameters look in the Function Reference and in Template Tags.

Usage

{{Parameter|name|datatype|description|importance|default}}

Parameters

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, default is the value that will be used if the parameter is not declared.

Example

{{Parameter|$something|string|This is a string.|optional|bah}}

Output

$something
(string) (optional) This is a string.
Default: bah