Wp Admin Settings API

Build plugin admin settings pages with the WordPress Settings API instead of custom form handlers. Covers `register_setting()`, `add_settings_section()`, `add_settings_field()`, `settings_fields()`, `do_settings_sections()`, `add_settings_error()`, `settings_errors()`, `admin_init` registration, `<form method="post" action="options.php">`, `sanitize_callback`, `$option_group` vs `$page`, single-array option storage, tabbed pages, `show_in_rest` schemas, custom option capabilities via `option_page_capability_{$option_group}`, and the mistake of POSTing to your own handler. Use for plugin settings screens, integration config, feature toggles, or any options page that saves to `wp_options`.

vikingokft 24adfb6 2 files · 21.8 KB Updated 0 repo stars

File contents

vikingokft/vikingo-studio-skills/tree/main/wordpress/wp-admin-settings-api commit 24adfb6146

Frequently asked questions

npx skillmds add vikingokft/wp-admin-settings-api