Core Function
View Source on Trac ↗ wp_send_json_error()
wp_send_json_error( mixed $value = null, mixed $status_code = null, mixed $flags = 0 ) Sends a JSON response back to an Ajax request, indicating failure.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $value mixed | Optional. Data to encode as JSON, then print and die. Default null. |
| $status_code int | Optional. The HTTP status code to output. Default null. |
| $flags int | Optional. Options to be passed to json_encode(). Default 0. |
Return Value
(void)
No return value description available.
Function Information
Since Version
3.5.0
Source File
wp-includes/functions.php
Advertisement