Collections functions
General functions
Render functions
Theme permission functions
Resource functions

ajax_build_message()

Description

Builds a message to be used in an AJAX response

Parameters

ColumnTypeDefaultDescription
$msg string An end-user message explaining what happened (as a generic message for fails or part of errors)

Return

array Returns a message

Location

include/ajax_functions.php lines 134 to 143

Definition

 
function ajax_build_message(string $msg)
    {
    
$msg trim($msg);
    if(
$msg == "")
        {
        
trigger_error("\$msg variable must not be empty.");
        }

    return array(
"message" => $msg);
    }

This article was last updated 4th October 2022 11:35 Europe/London time based on the source file dated 30th June 2022 11:10 Europe/London time.