WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2007 | * @param string $title Error title. |
2008 | * @param string|array $args Optional arguments to control behavior. |
2009 | */ |
2010 | function wp_die( $message = '', $title = '', $args = array() ) { |
2011 | if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) |
2012 | $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' ); |
2013 | elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) |
2014 | $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' ); |
2015 | else |
2016 | $function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' ); |
2017 |
|
2018 | call_user_func( $function, $message, $title, $args ); |
2019 | } |
2020 |
|
2021 | /** |
2022 | * Kill WordPress execution and display HTML message with error message. |
2023 | * |
2024 | * This is the default handler for wp_die if you want a custom one for your |
2025 | * site then you can overload using the wp_die_handler filter in wp_die |