rest_get_allowed_schema_keywords() WordPress Function
The rest_get_allowed_schema_keywords() function allows you to get a list of all the allowed schema keywords for the current site. This can be useful for plugins or themes that need to generate a schema for their content.
rest_get_allowed_schema_keywords() #
Get all valid JSON schema properties.
Return
(string[]) All valid JSON schema properties.
Source
File: wp-includes/rest-api.php
function rest_get_allowed_schema_keywords() { return array( 'title', 'description', 'default', 'type', 'format', 'enum', 'items', 'properties', 'additionalProperties', 'patternProperties', 'minProperties', 'maxProperties', 'minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'multipleOf', 'minLength', 'maxLength', 'pattern', 'minItems', 'maxItems', 'uniqueItems', 'anyOf', 'oneOf', ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.6.0 | Introduced. |