Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

ajax_send_response()

Description

Send AJAX response back to the client together with the appropriate HTTP status code

Parameters

ColumnTypeDefaultDescription
$code integer HTTP status code for this response
$response array Response data (@see other ajax_response_* functions for expected structure)

Return

void

Location

include/ajax_functions.php lines 43 to 48

Definition

 
function ajax_send_response($code, array $response)
    {
    
http_response_code($code);
    echo 
json_encode($response);
    exit();
    }

This article was last updated 1st December 2020 08:05 Europe/London time based on the source file dated 18th May 2020 11:26 Europe/London time.