Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_die_handler

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1970  */
1971 function wp_die( $message = '', $title = '', $args = array() ) {
1972      if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
1973           $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
1974      elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )
1975           $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' );
1976      elseif ( defined( 'APP_REQUEST' ) && APP_REQUEST )
1977           $function = apply_filters( 'wp_die_app_handler', '_scalar_wp_die_handler' );
1978      else
1979           $function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' );
1980
1981      call_user_func( $function, $message, $title, $args );
1982 }
1983
1984 /**
1985  * Kill WordPress execution and display HTML message with error message.
1986  *
1987  * This is the default handler for wp_die if you want a custom one for your
1988  * site then you can overload using the wp_die_handler filter in wp_die