[wp-trac] [WordPress Trac] #35666: Add support for HTTP response codes to wp_send_json_error(), wp_send_json_success(), and wp_send_json
WordPress Trac
noreply at wordpress.org
Sat Jan 30 11:54:47 UTC 2016
#35666: Add support for HTTP response codes to wp_send_json_error(),
wp_send_json_success(), and wp_send_json
-------------------------+-----------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.5
Severity: normal | Keywords: needs-patch
Focuses: |
-------------------------+-----------------------------
`wp_send_json_error()` is the JSON-encoded equivalent of `wp_die()`. It
should therefore support the sending of an HTTP response code in a similar
way so a more appropriate response code can be set for error conditions.
Currently, the response code needs to be set manually, otherwise it
defaults to `200`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35666>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list