Repository navigation
Commit e87a741
Editor: Introduce the Fields API and the
Adds a server-side registry of the fields of an entity, `WP_Fields_Registry`, filled on the new `fields_api_init` action, where fields are registered, updated, and unregistered. Fields can also be declared as files and registered with `wp_register_field_collection()`.
The registered fields and the script modules providing their JavaScript parts are served by the `wp/v2/fields` route. The script modules are declared as dynamic dependencies of the `wp-editor` script, and the fields of the post types the post editor and the site editor list are preloaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>wp/v2/fields REST route.1 parent 5a889b8 commit e87a741
29 files changed
Lines changed: 3599 additions & 0 deletions
File tree
- src
- wp-includes
- rest-api/endpoints
- tests
- phpunit
- data/fields
- collections
- duplicate/book
- authorship
- invalid
- book
- subtitle
- no_name
- skipped
- no_origin
- skipped
- null_name
- skipped
- valid
- book
- subtitle
- magazine
- issue
- fixture
- alpha
- beta
- tests
- rest-api
- qunit/fixtures
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
842 | 846 | | |
0 commit comments