Function
Send an AJAX error response.
tml_send_ajax_error( mixed $data = null )
Parameters
-
$datamixed Defaultnull - Data to send with the response.
Source
function tml_send_ajax_error( $data = null ) {
/**
* Filters the AJAX error data.
*
* @since 7.1
*
* @param mixed $data The AJAX error data.
*/
$data = apply_filters( 'tml_ajax_error_data', $data );
wp_send_json_error( $data );
}
Uses
Used by
Changelog
| Version | Description |
|---|---|
| 7.1 | Introduced. |