wpseek.com
A WordPress-centric search engine for devs and theme authors



_scalar_wp_die_handler › WordPress Function

Since3.4.0
Deprecatedn/a
_scalar_wp_die_handler ( $message = '', $title = '', $args = array() )
Access:
  • private
Parameters: (3)
  • (string) $message Optional. Response to print. Default empty string.
    Required: No
    Default: (empty)
  • (string) $title Optional. Error title (unused). Default empty string.
    Required: No
    Default: (empty)
  • (string|array) $args Optional. Arguments to control behavior. Default empty array.
    Required: No
    Default: array()
Defined at:
Codex:
Change Log:
  • 5.1.0

Kills WordPress execution and displays an error message.

This is the handler for wp_die() when processing APP requests.


Source

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;
	}
}