wp-admin-settings-api

Official

Secure plugin settings via WordPress Settings API

Authorvikingokft
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents insecure and buggy WordPress plugin settings pages by replacing custom form handlers with the built-in Settings API workflow that handles nonces, capability checks, sanitization dispatch, and option storage correctly.

Core Features & Use Cases

  • Registers settings correctly: Uses register_setting() on admin_init with an option group and option name so options.php can validate and save reliably.
  • Builds full settings screens: Creates sections and fields with add_settings_section(), add_settings_field(), then renders them with do_settings_sections().
  • Enforces safe saving and validation: Implements sanitize_callback patterns (including single-option-array storage for tabs) and uses settings_fields() and the required form action options.php.
  • Uses REST-aware configuration when needed: Sets show_in_rest schemas appropriately for settings exposed to REST while keeping sanitization consistent.

Quick Start

Use the wp-admin-settings-api skill to implement your plugin’s admin settings page by registering your option on admin_init, rendering the form with settings_fields($option_group) and do_settings_sections($page), and POSTing to options.php with a single sanitize_callback that preserves existing values across tabs.

Dependency Matrix

Required Modules

None required

Components

references

đź’» Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wp-admin-settings-api
Download link: https://github.com/vikingokft/wp-agent-skills/archive/main.zip#wp-admin-settings-api

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.