The Stack Overflow podcast is back! Listen to an interview with our new CEO.
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 23970

The Settings API, added in WordPress 2.7, allows admin pages containing settings forms to be managed semi-automatically. It lets you define settings pages, sections within those pages and fields within the sections. New settings pages can be registered along with sections and fields inside them. Existing settings pages can also be added to by registering new settings sections or fields inside of them.

2
votes
always always always escape output (ok, some rare cases you should not, but the rule of thumb is to escape). For textarea you need to html escape the content <textarea><?php echo esc_html(get_option( …
answered Mar 28 '17 by Mark Kaplun
0
votes
in register_settings you need to pass the names of the options you use. right now it seems like you left that call the same as from wherever you copy & pasted it (not criticizing at all here). If you …
answered Nov 28 '15 by Mark Kaplun
1
vote
One point which is probably less important, is that you do not need to worry about styling of headers and labels, as the settings API will take care of it. The more important aspect is software desig …
answered Nov 3 '17 by Mark Kaplun
1
vote
Settings API is (also) about the modularity of the settings, settings can be removed (never heard of anyone do it but it is possible) or amended (my favorite technique right now). When you separate …
answered Nov 26 '15 by Mark Kaplun
1
vote
Most likely your $options is a string and not an array. It is always better to validate that the $options are in the format you are expecting especially in development time when you are likely to sw …
answered Nov 5 '15 by Mark Kaplun
1
vote
Yes this is actually the same as point 1, just without the helpers Now this depends on how you want to use your setting. The instinct is that at 99% of the cases this will just add unneeded complexit …
answered Jun 11 '16 by Mark Kaplun
1
vote
Better to avoid such a thing. The settings API has two "faces", one the UI, and the other is handling the form submission. The form submission is handled on a different URL than the UI (/wp-admin/opti …
answered Sep 24 '17 by Mark Kaplun
0
votes
The problem is the location in the code where you are coding the update . Once you submit the form, options.php is being loaded and your plugin with it. At that point the options are updated from the …
answered Dec 14 '12 by Mark Kaplun
3
votes
The setting API, which its usage is being demonstrated in that code is meant to be use as a framework to create settings pages which result in update of values in options. Widget settings are is a so …
answered Oct 16 '16 by Mark Kaplun