Make WordPress Core

Ticket #35667: revision2.txt

File revision2.txt, 3.9 KB (added by ocean90, 11 years ago)
Line 
1<table>
2<tbody>
3<tr>
4<th style="width: 10%">Tag</th>
5<th style="width: 20%">Usage</th>
6<th style="width: 70%">Description</th>
7</tr>
8<tr>
9<td><strong>@access</strong></td>
10<td>public
11private
12protected</td>
13<td>Indicates access control for a function/method.
14<strong>@access private</strong> indicates the function should not be documented.
15Used directly below the <strong>@since</strong> line in block.</td>
16</tr>
17<tr>
18<td><strong>@deprecated</strong></td>
19<td>version x.x.x
20replacement function name</td>
21<td>What version of WordPress the function/method was deprecated. Use 3-digit version number. Should be accompanied by a matching <code>@see</code> tag.</td>
22</tr>
23<tr>
24<td><strong>@global</strong></td>
25<td>type global
26$varname
27description</td>
28<td>Document global(s) used in the function/method. For boolean and integer types, use <code>bool</code> and <code>int</code>, respectively.</td>
29</tr>
30<tr>
31<td><strong>@internal</strong></td>
32<td>information string</td>
33<td>Typically used for adding notes for internal use only.</td>
34</tr>
35<tr>
36<td><strong>@ignore</strong></td>
37<td>(standalone)</td>
38<td>Used to skip parsing of the entire element.</td>
39</tr>
40<tr>
41<td><strong>@link</strong></td>
42<td>URL</td>
43<td>Link to additional information for the function/method.
44For an external script/library, links to source.
45Not to be used for related functions/methods; use <strong>@see</strong> instead.</td>
46</tr>
47<tr>
48<td><strong>@method</strong></td>
49<td>returntype
50description</td>
51<td>Shows a "magic" method found inside the class.</td>
52</tr>
53<tr>
54<td><strong>@package</strong></td>
55<td>packagename</td>
56<td>Specifies package that all functions, includes, and defines in the file belong to. Found in DocBlock at top of the file. For core (and bundled themes), this is always <strong>WordPress</strong>.</td>
57</tr>
58<tr>
59<td><strong>@param</strong></td>
60<td>datatype $variable
61description</td>
62<td>Function/method parameter of the format: parameter type, variable name, description, default behavior. For boolean and integer types, use <code>bool</code> and <code>int</code>, respectively.</td>
63</tr>
64<tr>
65<td><strong>@return</strong></td>
66<td>datatype description</td>
67<td>Document the return value of functions or methods. <code>@return void</code> should not be used outside of the default bundled themes. For boolean and integer types, use <code>bool</code> and <code>int</code>, respectively.</td>
68</tr>
69<tr>
70<td><strong>@see</strong></td>
71<td>elementname</td>
72<td>References another function/method/class the function/method relies on.</td>
73</tr>
74<tr>
75<td><strong>@since</strong></td>
76<td>version x.x.x</td>
77<td>Documents release version function/method was added. Use 3-digit version number – this is to aid with version searches, and for use when comparing versions in code. Exception is <code>@since MU</code>.</td>
78</tr>
79<tr>
80<td><strong>@subpackage</strong></td>
81<td>subpackagename</td>
82<td>For page-level DocBlock, specifies the Component that all functions and defines in file belong to. For class-level DocBlock, specifies the subpackage/component the class belongs to.</td>
83</tr>
84<tr>
85<td><strong>@todo</strong></td>
86<td>information string</td>
87<td>Documents planned changes to an element that have not been implemented.</td>
88</tr>
89<tr>
90<td><strong>@type</strong></td>
91<td>datatype description for an argument array value</td>
92<td>Used to denote argument array value types. See the <strong>Hooks</strong> or <strong>Parameters That Are Arrays</strong> sections for example syntax.</td>
93</tr>
94<tr>
95<td><strong>@uses</strong></td>
96<td>class::methodname()
97class::$variablename
98functionname()</td>
99<td><strong>Note:</strong> This tag has been used in the past, but should no longer be used.
100References a key function/method used. May include a short description.</td>
101</tr>
102<tr>
103<td><strong>@var</strong></td>
104<td>datatype description</td>
105<td>Data type for a class variable and short description. Callbacks are marked <strong>callback</strong>.</td>
106</tr>
107</tbody>
108</table>