In the WordPress settings API, I understand that
register_setting() must be called for
add_settings_field() to be saved and updated according to the codex.
Since almost every WordPress function has an ID, slug, name, key or whatever they might be called which links from one function to another, I don't see how
register_setting( $option_group, $option_name) link to any settings api function.
$option_group is used when
settings_field() is called.
Question 1: But what does that really do?
The second parameter
$option_name is simple,
get_option($option_name). Yes I unsderstand that.
do_settings_sections(), from what I understand, is pretty simple. It asks for the slug / id / name of the page from
add_options_page() you defined, which is linked to
add_settings_field() in the same sensible manner (id / slug / name / etc).
So now for the main question: How does
register_setting() knows which settings I'm relating to?
I'm sorry if I sound so confused, because maybe I AM confused.
Gladly appreciate any help guys. Thanks.