File tree Expand file tree Collapse file tree 1 file changed +27
-27
lines changed
Expand file tree Collapse file tree 1 file changed +27
-27
lines changed Original file line number Diff line number Diff line change 1414 </standard >
1515 <standard >
1616 <![CDATA[
17+ Even though the autoload parameter is optional for `add_option()` and `update_option()`, it is
18+ strongly recommended to always explicitly set it.
19+ ]]>
20+ </standard >
21+ <code_comparison >
22+ <code title =" Valid: Explicitly setting the autoload parameter." >
23+ <![CDATA[
24+ add_option(
25+ 'my_option',
26+ 'value',
27+ '',
28+ <em>true</em>
29+ );
30+ ]]>
31+ </code >
32+ <code title =" Invalid: Autoload parameter missing." >
33+ <![CDATA[
34+ add_option(
35+ 'my_option',
36+ 'value',
37+ ''
38+ );
39+ ]]>
40+ </code >
41+ </code_comparison >
42+ <standard >
43+ <![CDATA[
1744 The following values should be used when setting the autoload parameter depending on the function:
1845
1946 - For `add_option()` and `update_option()`: `true`, `false`, or `null`.
@@ -66,33 +93,6 @@ wp_set_option_autoload_values(
6693wp_set_options_autoload(
6794 array('option1', 'option2'),
6895 <em>1</em>
69- );
70- ]]>
71- </code >
72- </code_comparison >
73- <standard >
74- <![CDATA[
75- Even though the autoload parameter is optional for `add_option()` and `update_option()`, it is
76- strongly recommended to always explicitly set it.
77- ]]>
78- </standard >
79- <code_comparison >
80- <code title =" Valid: Explicitly setting the autoload parameter." >
81- <![CDATA[
82- add_option(
83- 'my_option',
84- 'value',
85- '',
86- <em>true</em>
87- );
88- ]]>
89- </code >
90- <code title =" Invalid: Autoload parameter missing." >
91- <![CDATA[
92- add_option(
93- 'my_option',
94- 'value',
95- ''
9696);
9797 ]]>
9898 </code >
You can’t perform that action at this time.
0 commit comments