Un motore di ricerca WordPress per sviluppatori e autori di temi



_scalar_wp_die_handler ›

Da3.4.0
Deprecaton/a
_scalar_wp_die_handler ( $message = '', $title = '', $args = array() )
Accedi:
  • private
Parametri: (3)
  • (string) $message Optional. Response to print. Default empty.
    Richiesto: No
    Default: (vuoto)
  • (string) $title Optional. Error title (unused). Default empty.
    Richiesto: No
    Default: (vuoto)
  • (string|array) $args Optional. Arguments to control behavior. Default empty array.
    Richiesto: No
    Default: array()
Definito a:
Codex:
ChangeLog:
  • 5.1.0

Kills WordPress execution and displays an error message.

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



Sorgenti

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