You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REST API: Add a shared helper for JSON Schema allowed keywords.
Introduce `wp_get_json_schema_allowed_keywords()` as the single place to decide which JSON Schema keywords may stay in schema output. It supports two profiles: `rest-api` (the default, used for REST route output) and `draft-04` (a wider draft-04 set used when publishing schemas to clients such as the Abilities API).
Route schema output now flows through the helper and the new `wp_json_schema_allowed_keywords` filter, replacing the Abilities-specific special casing in the REST list controller. Validation internals still call `rest_get_allowed_schema_keywords()` directly, so REST validation behavior does not change.
Props gziolo, apermo.
See #64955.
git-svn-id: https://develop.svn.wordpress.org/trunk@62549 602fd350-edb4-49c9-b593-d223f7449a82
0 commit comments