Commit e8de3cc
Add BaseSettingsRESTController for plugin-ui settings (#3)
* Add BaseSettingsRESTController for schema-driven settings management
Introduces an abstract REST controller compatible with @wedevs/plugin-ui
<Settings> component. Includes variant-aware validation and sanitization,
permission checks with WP_Error, deep-merge persistence to wp_options,
and comprehensive apply_filters/do_action hooks for extensibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Settings controller documentation to developer guide
Documents BaseSettingsRESTController usage: creating a controller,
defining schemas, supported field variants, translatable messages,
extending settings via hooks, and the full hook reference table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add CLAUDE.md config and exclude dev files from composer exports
Adds project context for Claude Code, .gitattributes with export-ignore
for CLAUDE.md, .claude/, tests/, docs/, and config files so consumer
plugins don't receive them via composer install.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix PHPCS violations in BaseSettingsRESTController
Add file doc comment, fix Yoda conditions, multi-line function call
formatting, short ternary usage, and missing doc comment descriptions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix number sanitization to preserve decimal values
Use floatval() for decimal numbers and intval() for integers instead
of always truncating with intval(). Also remove file doc comment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add file doc comment to BaseSettingsRESTController
Required by PHPCS Squiz.Commenting.FileComment rule.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 47d86d1 commit e8de3cc
5 files changed
Lines changed: 1049 additions & 2 deletions
File tree
- docs
- src/Settings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments