A WordPress-centric search engine for devs and theme authors



wp-includes/rest-api.php ›

Functions58
REST API functions.


Function Short description
create_initial_rest_routesRegisters default REST API routes.
get_rest_urlRetrieves the URL to a REST endpoint on a site.
register_rest_fieldRegisters a new field on an existing WordPress object type.
register_rest_routeRegisters a REST API route.
rest_api_default_filtersRegisters the default REST API filters.
rest_api_initRegisters rewrite rules for the API.
rest_api_loadedLoads the REST API.
rest_api_register_rewritesAdds REST rewrite rules.
rest_authorization_required_codeReturns a contextual HTTP error code for authorization failure.
rest_cookie_check_errorsChecks for errors when using cookie-based authentication.
rest_cookie_collect_statusCollects cookie authentication status.
rest_default_additional_properties_to_falseSets the "additionalProperties" to false by default for all object definitions in the schema.
rest_do_requestDo a REST request.
rest_ensure_requestEnsures request arguments are a request object (for consistency).
rest_ensure_responseEnsures a REST response is a response object (for consistency).
rest_filter_response_by_contextFilters the response to remove any fields not available in the given context.
rest_filter_response_fieldsFilter the API response to include only a white-listed set of response object fields.
rest_get_avatar_sizesRetrieves the pixel sizes for avatars.
rest_get_avatar_urlsRetrieves the avatar urls in various sizes.
rest_get_best_type_for_valueGets the best type for a value.
rest_get_date_with_gmtParses a date into both its local and UTC equivalent, in MySQL datetime format.
rest_get_queried_resource_routeGets the REST route for the currently queried object.
rest_get_route_for_postGets the REST API route for a post.
rest_get_route_for_termGets the REST API route for a term.
rest_get_serverRetrieves the current REST server instance.
rest_get_url_prefixRetrieves the URL prefix for any API resource.
rest_handle_deprecated_argumentHandles _deprecated_argument() errors.
rest_handle_deprecated_functionHandles _deprecated_function() errors.
rest_handle_doing_it_wrongHandles _doing_it_wrong errors.
rest_handle_multi_type_schemaHandles getting the best type for a multi-type schema.
rest_handle_options_requestHandles OPTIONS requests for the server.
rest_is_arrayDetermines if a given value is array-like.
rest_is_booleanDetermines if a given value is boolean-like.
rest_is_field_includedGiven an array of fields to include in a response, some of which may be `nested.fields`, determine whether the provided field should be included in the response body.
rest_is_integerDetermines if a given value is integer-like.
rest_is_ip_addressDetermines if an IP address is valid.
rest_is_objectDetermines if a given value is object-like.
rest_output_link_headerSends a Link header for the REST API.
rest_output_link_wp_headOutputs the REST API link tag into page header.
rest_output_rsdAdds the REST API URL to the WP RSD endpoint.
rest_parse_dateParses an RFC3339 time into a Unix timestamp.
rest_parse_embed_paramParses the "_embed" parameter into the list of resources to embed.
rest_parse_hex_colorParses a 3 or 6 digit hex color (with #).
rest_parse_request_argParse a request argument based on details registered to the route.
rest_preload_api_requestAppend result of internal request to REST API for purpose of preloading data to be attached to a page.
rest_sanitize_arrayConverts an array-like value to an array.
rest_sanitize_booleanChanges a boolean-like value into the proper boolean value.
rest_sanitize_objectConverts an object-like value to an object.
rest_sanitize_request_argSanitize a request argument based on details registered to the route.
rest_sanitize_value_from_schemaSanitize a value based on a schema.
rest_send_allow_headerSends the "Allow" header to state all methods that can be sent to the current route.
rest_send_cors_headersSends Cross-Origin Resource Sharing headers with API requests.
rest_stabilize_valueStabilizes a value following JSON Schema semantics.
rest_urlRetrieves the URL to a REST endpoint.
rest_validate_array_contains_unique_itemsChecks if an array is made up of unique items.
rest_validate_request_argValidate a request argument based on details registered to the route.
rest_validate_value_from_schemaValidate a value based on a schema.
_rest_array_intersect_key_recursiveRecursively computes the intersection of arrays using keys for comparison.