wpseek.com
A WordPress-centric search engine for devs and theme authors
wp-includes/rest-api.php › WordPress File
Functions83
› REST API functions.
Function | Short description |
---|---|
create_initial_rest_routes | Registers default REST API routes. |
get_rest_url | Retrieves the URL to a REST endpoint on a site. |
register_rest_field | Registers a new field on an existing WordPress object type. |
register_rest_route | Registers a REST API route. |
rest_add_application_passwords_to_index | Adds Application Passwords info to the REST API index. |
rest_api_default_filters | Registers the default REST API filters. |
rest_api_init | Registers rewrite rules for the REST API. |
rest_api_loaded | Loads the REST API. |
rest_api_register_rewrites | Adds REST rewrite rules. |
rest_application_password_check_errors | Checks for errors when using application password-based authentication. |
rest_application_password_collect_status | Collects the status of authenticating with an application password. |
rest_are_values_equal | Checks the equality of two values, following JSON Schema semantics. |
rest_authorization_required_code | Returns a contextual HTTP error code for authorization failure. |
rest_convert_error_to_response | Converts an error to a response object. |
rest_cookie_check_errors | Checks for errors when using cookie-based authentication. |
rest_cookie_collect_status | Collects cookie authentication status. |
rest_default_additional_properties_to_false | Sets the "additionalProperties" to false by default for all object definitions in the schema. |
rest_do_request | Do a REST request. |
rest_ensure_request | Ensures request arguments are a request object (for consistency). |
rest_ensure_response | Ensures a REST response is a response object (for consistency). |
rest_filter_response_by_context | Filters the response to remove any fields not available in the given context. |
rest_filter_response_fields | Filters the REST API response to include only an allow-listed set of response object fields. |
rest_find_any_matching_schema | Finds the matching schema among the "anyOf" schemas. |
rest_find_matching_pattern_property_schema | Finds the schema for a property using the patternProperties keyword. |
rest_find_one_matching_schema | Finds the matching schema among the "oneOf" schemas. |
rest_format_combining_operation_error | Formats a combining operation error into a WP_Error object. |
rest_get_allowed_schema_keywords | Get all valid JSON schema properties. |
rest_get_authenticated_app_password | Gets the Application Password used for authenticating the request. |
rest_get_avatar_sizes | Retrieves the pixel sizes for avatars. |
rest_get_avatar_urls | Retrieves the avatar URLs in various sizes. |
rest_get_best_type_for_value | Gets the best type for a value. |
rest_get_combining_operation_error | Gets the error of combining operation. |
rest_get_date_with_gmt | Parses a date into both its local and UTC equivalent, in MySQL datetime format. |
rest_get_endpoint_args_for_schema | Retrieves an array of endpoint arguments from the item schema and endpoint method. |
rest_get_queried_resource_route | Gets the REST route for the currently queried object. |
rest_get_route_for_post | Gets the REST API route for a post. |
rest_get_route_for_post_type_items | Gets the REST API route for a post type. |
rest_get_route_for_taxonomy_items | Gets the REST API route for a taxonomy. |
rest_get_route_for_term | Gets the REST API route for a term. |
rest_get_server | Retrieves the current REST server instance. |
rest_get_url_prefix | Retrieves the URL prefix for any API resource. |
rest_handle_deprecated_argument | Handles _deprecated_argument() errors. |
rest_handle_deprecated_function | Handles _deprecated_function() errors. |
rest_handle_doing_it_wrong | Handles _doing_it_wrong errors. |
rest_handle_multi_type_schema | Handles getting the best type for a multi-type schema. |
rest_handle_options_request | Handles OPTIONS requests for the server. |
rest_is_array | Determines if a given value is array-like. |
rest_is_boolean | Determines if a given value is boolean-like. |
rest_is_field_included | Given 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_integer | Determines if a given value is integer-like. |
rest_is_ip_address | Determines if an IP address is valid. |
rest_is_object | Determines if a given value is object-like. |
rest_output_link_header | Sends a Link header for the REST API. |
rest_output_link_wp_head | Outputs the REST API link tag into page header. |
rest_output_rsd | Adds the REST API URL to the WP RSD endpoint. |
rest_parse_date | Parses an RFC3339 time into a Unix timestamp. |
rest_parse_embed_param | Parses the "_embed" parameter into the list of resources to embed. |
rest_parse_hex_color | Parses a 3 or 6 digit hex color (with #). |
rest_parse_request_arg | Parse a request argument based on details registered to the route. |
rest_preload_api_request | Append result of internal request to REST API for purpose of preloading data to be attached to a page. |
rest_sanitize_array | Converts an array-like value to an array. |
rest_sanitize_boolean | Changes a boolean-like value into the proper boolean value. |
rest_sanitize_object | Converts an object-like value to an array. |
rest_sanitize_request_arg | Sanitize a request argument based on details registered to the route. |
rest_sanitize_value_from_schema | Sanitize a value based on a schema. |
rest_send_allow_header | Sends the "Allow" header to state all methods that can be sent to the current route. |
rest_send_cors_headers | Sends Cross-Origin Resource Sharing headers with API requests. |
rest_stabilize_value | Stabilizes a value following JSON Schema semantics. |
rest_url | Retrieves the URL to a REST endpoint. |
rest_validate_array_contains_unique_items | Checks if an array is made up of unique items. |
rest_validate_array_value_from_schema | Validates an array value based on a schema. |
rest_validate_boolean_value_from_schema | Validates a boolean value based on a schema. |
rest_validate_enum | Validates that the given value is a member of the JSON Schema "enum". |
rest_validate_integer_value_from_schema | Validates an integer value based on a schema. |
rest_validate_json_schema_pattern | Validates if the JSON Schema pattern matches a value. |
rest_validate_null_value_from_schema | Validates a null value based on a schema. |
rest_validate_number_value_from_schema | Validates a number value based on a schema. |
rest_validate_object_value_from_schema | Validates an object value based on a schema. |
rest_validate_request_arg | Validate a request argument based on details registered to the route. |
rest_validate_string_value_from_schema | Validates a string value based on a schema. |
rest_validate_value_from_schema | Validate a value based on a schema. |
wp_is_rest_endpoint | Checks whether a REST API endpoint request is currently being handled. |
_rest_array_intersect_key_recursive | Recursively computes the intersection of arrays using keys for comparison. |