Setting the file. One moment.
Subchapter 17.5
references/routes-and-endpoints.mdMarkdown1 KBView on GitHub
rest_api_init hook with register_rest_route( $namespace, $route, $args ).?rest_route=/namespace/route.vendor/v1).wp/* namespace unless you are targeting core.WP_REST_Server::READABLE (GET), CREATABLE (POST), EDITABLE (PUT/PATCH), DELETABLE (DELETE).permission_callback.__return_true.current_user_can) or object-level authorization.permission_callback emits a _doing_it_wrong notice in modern WP.args to validate and sanitize inputs.type, required, default, validate_callback, sanitize_callback.WP_REST_Request object, not $_GET/$_POST.rest_ensure_response() or a WP_REST_Response.WP_Error with a status in data for error responses.wp_send_json() in REST callbacks.