_scalar_wp_die_handler

The timeline below displays how wordpress function _scalar_wp_die_handler has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Kills WordPress execution and displays an error message.
 *
 * This is the handler for wp_die() when processing APP requests.
 *
 * @since 3.4.0
 * @since 5.1.0 Added the $title and $args parameters.
 * @access private
 *
 * @param string       $message Optional. Response to print. Default empty string.
 * @param string       $title   Optional. Error title (unused). Default empty string.
 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
 */
function _scalar_wp_die_handler($message = '', $title = '', $args = array())
{
    list($message, $title, $parsed_args) = _wp_die_process_input($message, $title, $args);
    if ($parsed_args['exit']) {
        if (is_scalar($message)) {
            die((string) $message);
        }
        die;
    }
    if (is_scalar($message)) {
        echo (string) $message;
    }
}

WordPress Version: 5.3

/**
 * Kills WordPress execution and displays an error message.
 *
 * This is the handler for wp_die() when processing APP requests.
 *
 * @since 3.4.0
 * @since 5.1.0 Added the $title and $args parameters.
 * @access private
 *
 * @param string       $message Optional. Response to print. Default empty.
 * @param string       $title   Optional. Error title (unused). Default empty.
 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
 */
function _scalar_wp_die_handler($message = '', $title = '', $args = array())
{
    list($message, $title, $parsed_args) = _wp_die_process_input($message, $title, $args);
    if ($parsed_args['exit']) {
        if (is_scalar($message)) {
            die((string) $message);
        }
        die;
    }
    if (is_scalar($message)) {
        echo (string) $message;
    }
}

WordPress Version: 5.2

/**
 * Kills WordPress execution and displays an error message.
 *
 * This is the handler for wp_die() when processing APP requests.
 *
 * @since 3.4.0
 * @since 5.1.0 Added the $title and $args parameters.
 * @access private
 *
 * @param string       $message Optional. Response to print. Default empty.
 * @param string       $title   Optional. Error title (unused). Default empty.
 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
 */
function _scalar_wp_die_handler($message = '', $title = '', $args = array())
{
    list($message, $title, $r) = _wp_die_process_input($message, $title, $args);
    if ($r['exit']) {
        if (is_scalar($message)) {
            die((string) $message);
        }
        die;
    }
    if (is_scalar($message)) {
        echo (string) $message;
    }
}

WordPress Version: 5.1

/**
 * Kill WordPress execution.
 *
 * This is the handler for wp_die when processing APP requests.
 *
 * @since 3.4.0
 * @since 5.1.0 Added the $title and $args parameters.
 * @access private
 *
 * @param string       $message Optional. Response to print. Default empty.
 * @param string       $title   Optional. Error title (unused). Default empty.
 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
 */
function _scalar_wp_die_handler($message = '', $title = '', $args = array())
{
    list($message, $title, $r) = _wp_die_process_input($message, $title, $args);
    if ($r['exit']) {
        if (is_scalar($message)) {
            die((string) $message);
        }
        die;
    }
    if (is_scalar($message)) {
        echo (string) $message;
    }
}

WordPress Version: 4.0

/**
 * Kill WordPress execution.
 *
 * This is the handler for wp_die when processing APP requests.
 *
 * @since 3.4.0
 * @access private
 *
 * @param string $message Optional. Response to print. Default empty.
 */
function _scalar_wp_die_handler($message = '')
{
    if (is_scalar($message)) {
        die((string) $message);
    }
    die;
}

WordPress Version: 3.7

/**
 * Kill WordPress execution.
 *
 * This is the handler for wp_die when processing APP requests.
 *
 * @since 3.4.0
 * @access private
 *
 * @param string $message Optional. Response to print.
 */
function _scalar_wp_die_handler($message = '')
{
    if (is_scalar($message)) {
        die((string) $message);
    }
    die;
}