Codex tools: Log in / create account
Contents |
You can add new settings fields (basically, an option for wp_options database table but totally managed for you) to the existing WordPress pages using this function. Your callback function just needs to output the appropriate html input and fill it with the old value, the saving will be done behind the scenes. You can create your own sections on existing pages using add_settings_section().
NOTE: You MUST register any options you use with add_settings_field() or they won't be saved and updated automatically.
<?php add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()); ?>
Since: 2.7.0
add_settings_field() is located in wp-admin/includes/template.php.
Settings API: register_setting, unregister_setting, add_settings_field, add_settings_section