Some code I’m looking at from a Plugin contains this line
add_settings_section("section", "Settings", null, "theme-options");
which has a
Having looked at https://codex.wordpress.org/Function_Reference/add_settings_section
$callback – (string) (required) Function that fills the section with the desired content. The function should echo its output.
So, why is this
null and what are the implications?
$callback = NULL means there is the
$callback variable but it has no the
In this case, unless you add any setting fields by
add_setting_field() and register those settings by
register_setting(), you’ll get the
Settings subheader on the
Settings page without any content in this section.
Here is an old tutorial which can be useful to show what I’m talking about. See the third screenshot and the code above it.