{"pageProps":{"title":"rest_get_allowed_schema_keywords()","titleType":"Function","type":"functions","content":"

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.


Top ↑

Source

File: wp-includes/rest-api.php

function rest_get_allowed_schema_keywords() {\n\treturn array(\n\t\t'title',\n\t\t'description',\n\t\t'default',\n\t\t'type',\n\t\t'format',\n\t\t'enum',\n\t\t'items',\n\t\t'properties',\n\t\t'additionalProperties',\n\t\t'patternProperties',\n\t\t'minProperties',\n\t\t'maxProperties',\n\t\t'minimum',\n\t\t'maximum',\n\t\t'exclusiveMinimum',\n\t\t'exclusiveMaximum',\n\t\t'multipleOf',\n\t\t'minLength',\n\t\t'maxLength',\n\t\t'pattern',\n\t\t'minItems',\n\t\t'maxItems',\n\t\t'uniqueItems',\n\t\t'anyOf',\n\t\t'oneOf',\n\t);\n}\n

Expand full source codeCollapse full source codeView on TracView on GitHub


Top ↑

Related


Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.
","description":"Get all valid JSON schema properties.","sidebarFiles":{"Hook":[{"componentTitle":"rest_api_init","componentLink":"/reference/hooks/rest_api_init","private":"","deprecated":""},{"componentTitle":"rest_avatar_sizes","componentLink":"/reference/hooks/rest_avatar_sizes","private":"","deprecated":""},{"componentTitle":"rest_queried_resource_route","componentLink":"/reference/hooks/rest_queried_resource_route","private":"","deprecated":""},{"componentTitle":"rest_route_for_post","componentLink":"/reference/hooks/rest_route_for_post","private":"","deprecated":""},{"componentTitle":"rest_route_for_post_type_items","componentLink":"/reference/hooks/rest_route_for_post_type_items","private":"","deprecated":""},{"componentTitle":"rest_route_for_taxonomy_items","componentLink":"/reference/hooks/rest_route_for_taxonomy_items","private":"","deprecated":""},{"componentTitle":"rest_route_for_term","componentLink":"/reference/hooks/rest_route_for_term","private":"","deprecated":""},{"componentTitle":"rest_url","componentLink":"/reference/hooks/rest_url","private":"","deprecated":""},{"componentTitle":"rest_url_prefix","componentLink":"/reference/hooks/rest_url_prefix","private":"","deprecated":""},{"componentTitle":"wp_rest_search_handlers","componentLink":"/reference/hooks/wp_rest_search_handlers","private":"","deprecated":""},{"componentTitle":"wp_rest_server_class","componentLink":"/reference/hooks/wp_rest_server_class","private":"","deprecated":""}],"Function":[{"componentTitle":"create_initial_rest_routes()","componentLink":"/reference/functions/create_initial_rest_routes","private":"","deprecated":""},{"componentTitle":"get_rest_url()","componentLink":"/reference/functions/get_rest_url","private":"","deprecated":""},{"componentTitle":"register_rest_field()","componentLink":"/reference/functions/register_rest_field","private":"","deprecated":""},{"componentTitle":"register_rest_route()","componentLink":"/reference/functions/register_rest_route","private":"","deprecated":""},{"componentTitle":"rest_add_application_passwords_to_index()","componentLink":"/reference/functions/rest_add_application_passwords_to_index","private":"","deprecated":""},{"componentTitle":"rest_api_default_filters()","componentLink":"/reference/functions/rest_api_default_filters","private":"","deprecated":""},{"componentTitle":"rest_api_init()","componentLink":"/reference/functions/rest_api_init","private":"","deprecated":""},{"componentTitle":"rest_api_loaded()","componentLink":"/reference/functions/rest_api_loaded","private":"","deprecated":""},{"componentTitle":"rest_api_register_rewrites()","componentLink":"/reference/functions/rest_api_register_rewrites","private":"","deprecated":""},{"componentTitle":"rest_application_password_check_errors()","componentLink":"/reference/functions/rest_application_password_check_errors","private":"","deprecated":""},{"componentTitle":"rest_application_password_collect_status()","componentLink":"/reference/functions/rest_application_password_collect_status","private":"","deprecated":""},{"componentTitle":"rest_are_values_equal()","componentLink":"/reference/functions/rest_are_values_equal","private":"","deprecated":""},{"componentTitle":"rest_authorization_required_code()","componentLink":"/reference/functions/rest_authorization_required_code","private":"","deprecated":""},{"componentTitle":"rest_convert_error_to_response()","componentLink":"/reference/functions/rest_convert_error_to_response","private":"","deprecated":""},{"componentTitle":"rest_cookie_check_errors()","componentLink":"/reference/functions/rest_cookie_check_errors","private":"","deprecated":""},{"componentTitle":"rest_cookie_collect_status()","componentLink":"/reference/functions/rest_cookie_collect_status","private":"","deprecated":""},{"componentTitle":"rest_default_additional_properties_to_false()","componentLink":"/reference/functions/rest_default_additional_properties_to_false","private":"","deprecated":""},{"componentTitle":"rest_do_request()","componentLink":"/reference/functions/rest_do_request","private":"","deprecated":""},{"componentTitle":"rest_ensure_request()","componentLink":"/reference/functions/rest_ensure_request","private":"","deprecated":""},{"componentTitle":"rest_ensure_response()","componentLink":"/reference/functions/rest_ensure_response","private":"","deprecated":""},{"componentTitle":"rest_filter_response_by_context()","componentLink":"/reference/functions/rest_filter_response_by_context","private":"","deprecated":""},{"componentTitle":"rest_filter_response_fields()","componentLink":"/reference/functions/rest_filter_response_fields","private":"","deprecated":""},{"componentTitle":"rest_find_any_matching_schema()","componentLink":"/reference/functions/rest_find_any_matching_schema","private":"","deprecated":""},{"componentTitle":"rest_find_matching_pattern_property_schema()","componentLink":"/reference/functions/rest_find_matching_pattern_property_schema","private":"","deprecated":""},{"componentTitle":"rest_find_one_matching_schema()","componentLink":"/reference/functions/rest_find_one_matching_schema","private":"","deprecated":""},{"componentTitle":"rest_format_combining_operation_error()","componentLink":"/reference/functions/rest_format_combining_operation_error","private":"","deprecated":""},{"componentTitle":"rest_get_allowed_schema_keywords()","componentLink":"/reference/functions/rest_get_allowed_schema_keywords","private":"","deprecated":"","active":"active"},{"componentTitle":"rest_get_authenticated_app_password()","componentLink":"/reference/functions/rest_get_authenticated_app_password","private":"","deprecated":""},{"componentTitle":"rest_get_avatar_sizes()","componentLink":"/reference/functions/rest_get_avatar_sizes","private":"","deprecated":""},{"componentTitle":"rest_get_avatar_urls()","componentLink":"/reference/functions/rest_get_avatar_urls","private":"","deprecated":""},{"componentTitle":"rest_get_best_type_for_value()","componentLink":"/reference/functions/rest_get_best_type_for_value","private":"","deprecated":""},{"componentTitle":"rest_get_combining_operation_error()","componentLink":"/reference/functions/rest_get_combining_operation_error","private":"","deprecated":""},{"componentTitle":"rest_get_date_with_gmt()","componentLink":"/reference/functions/rest_get_date_with_gmt","private":"","deprecated":""},{"componentTitle":"rest_get_endpoint_args_for_schema()","componentLink":"/reference/functions/rest_get_endpoint_args_for_schema","private":"","deprecated":""},{"componentTitle":"rest_get_queried_resource_route()","componentLink":"/reference/functions/rest_get_queried_resource_route","private":"","deprecated":""},{"componentTitle":"rest_get_route_for_post_type_items()","componentLink":"/reference/functions/rest_get_route_for_post_type_items","private":"","deprecated":""},{"componentTitle":"rest_get_route_for_post()","componentLink":"/reference/functions/rest_get_route_for_post","private":"","deprecated":""},{"componentTitle":"rest_get_route_for_taxonomy_items()","componentLink":"/reference/functions/rest_get_route_for_taxonomy_items","private":"","deprecated":""},{"componentTitle":"rest_get_route_for_term()","componentLink":"/reference/functions/rest_get_route_for_term","private":"","deprecated":""},{"componentTitle":"rest_get_server()","componentLink":"/reference/functions/rest_get_server","private":"","deprecated":""},{"componentTitle":"rest_get_url_prefix()","componentLink":"/reference/functions/rest_get_url_prefix","private":"","deprecated":""},{"componentTitle":"rest_handle_deprecated_argument()","componentLink":"/reference/functions/rest_handle_deprecated_argument","private":"","deprecated":""},{"componentTitle":"rest_handle_deprecated_function()","componentLink":"/reference/functions/rest_handle_deprecated_function","private":"","deprecated":""},{"componentTitle":"rest_handle_doing_it_wrong()","componentLink":"/reference/functions/rest_handle_doing_it_wrong","private":"","deprecated":""},{"componentTitle":"rest_handle_multi_type_schema()","componentLink":"/reference/functions/rest_handle_multi_type_schema","private":"","deprecated":""},{"componentTitle":"rest_handle_options_request()","componentLink":"/reference/functions/rest_handle_options_request","private":"","deprecated":""},{"componentTitle":"rest_is_array()","componentLink":"/reference/functions/rest_is_array","private":"","deprecated":""},{"componentTitle":"rest_is_boolean()","componentLink":"/reference/functions/rest_is_boolean","private":"","deprecated":""},{"componentTitle":"rest_is_field_included()","componentLink":"/reference/functions/rest_is_field_included","private":"","deprecated":""},{"componentTitle":"rest_is_integer()","componentLink":"/reference/functions/rest_is_integer","private":"","deprecated":""},{"componentTitle":"rest_is_ip_address()","componentLink":"/reference/functions/rest_is_ip_address","private":"","deprecated":""},{"componentTitle":"rest_is_object()","componentLink":"/reference/functions/rest_is_object","private":"","deprecated":""},{"componentTitle":"rest_output_link_header()","componentLink":"/reference/functions/rest_output_link_header","private":"","deprecated":""},{"componentTitle":"rest_output_link_wp_head()","componentLink":"/reference/functions/rest_output_link_wp_head","private":"","deprecated":""},{"componentTitle":"rest_output_rsd()","componentLink":"/reference/functions/rest_output_rsd","private":"","deprecated":""},{"componentTitle":"rest_parse_date()","componentLink":"/reference/functions/rest_parse_date","private":"","deprecated":""},{"componentTitle":"rest_parse_embed_param()","componentLink":"/reference/functions/rest_parse_embed_param","private":"","deprecated":""},{"componentTitle":"rest_parse_hex_color()","componentLink":"/reference/functions/rest_parse_hex_color","private":"","deprecated":""},{"componentTitle":"rest_parse_request_arg()","componentLink":"/reference/functions/rest_parse_request_arg","private":"","deprecated":""},{"componentTitle":"rest_preload_api_request()","componentLink":"/reference/functions/rest_preload_api_request","private":"","deprecated":""},{"componentTitle":"rest_sanitize_array()","componentLink":"/reference/functions/rest_sanitize_array","private":"","deprecated":""},{"componentTitle":"rest_sanitize_boolean()","componentLink":"/reference/functions/rest_sanitize_boolean","private":"","deprecated":""},{"componentTitle":"rest_sanitize_object()","componentLink":"/reference/functions/rest_sanitize_object","private":"","deprecated":""},{"componentTitle":"rest_sanitize_request_arg()","componentLink":"/reference/functions/rest_sanitize_request_arg","private":"","deprecated":""},{"componentTitle":"rest_sanitize_value_from_schema()","componentLink":"/reference/functions/rest_sanitize_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_send_allow_header()","componentLink":"/reference/functions/rest_send_allow_header","private":"","deprecated":""},{"componentTitle":"rest_send_cors_headers()","componentLink":"/reference/functions/rest_send_cors_headers","private":"","deprecated":""},{"componentTitle":"rest_stabilize_value()","componentLink":"/reference/functions/rest_stabilize_value","private":"","deprecated":""},{"componentTitle":"rest_url()","componentLink":"/reference/functions/rest_url","private":"","deprecated":""},{"componentTitle":"rest_validate_array_contains_unique_items()","componentLink":"/reference/functions/rest_validate_array_contains_unique_items","private":"","deprecated":""},{"componentTitle":"rest_validate_array_value_from_schema()","componentLink":"/reference/functions/rest_validate_array_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_boolean_value_from_schema()","componentLink":"/reference/functions/rest_validate_boolean_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_enum()","componentLink":"/reference/functions/rest_validate_enum","private":"","deprecated":""},{"componentTitle":"rest_validate_integer_value_from_schema()","componentLink":"/reference/functions/rest_validate_integer_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_json_schema_pattern()","componentLink":"/reference/functions/rest_validate_json_schema_pattern","private":"","deprecated":""},{"componentTitle":"rest_validate_null_value_from_schema()","componentLink":"/reference/functions/rest_validate_null_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_number_value_from_schema()","componentLink":"/reference/functions/rest_validate_number_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_object_value_from_schema()","componentLink":"/reference/functions/rest_validate_object_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_request_arg()","componentLink":"/reference/functions/rest_validate_request_arg","private":"","deprecated":""},{"componentTitle":"rest_validate_string_value_from_schema()","componentLink":"/reference/functions/rest_validate_string_value_from_schema","private":"","deprecated":""},{"componentTitle":"rest_validate_value_from_schema()","componentLink":"/reference/functions/rest_validate_value_from_schema","private":"","deprecated":""},{"componentTitle":"_rest_array_intersect_key_recursive()","componentLink":"/reference/functions/_rest_array_intersect_key_recursive","private":"","deprecated":""}]}},"__N_SSG":true}