WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

say i have an option

update_option('pp_options', $options);

when i want to create a form for that, i learnt that i have to create a settings group

register_setting('pp_options_group', 'pp_options');

then in the form do


but i dont really what is the settings group actually for? i know its to do with sanitization but why the need to create a group for sanitization?

share|improve this question
up vote 1 down vote accepted

Sanitization is secondary function. Main is:

The register_setting and unregister_setting functions add and remove options from a whitelist of allowed options that the form is able to save. They can also name a sanitize callback function as a security measure to check each option's value. ( Register settings )

Technically $option_group argument is used for:

  • array key in global array of whitelisted options
  • part of filter name to run sanitization callback
share|improve this answer
I believe this also adds in the nonces for security, so the plugin developer doesn't have to. – jjeaton Jul 26 '11 at 3:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.