Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_should_handle_php_error

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
107            * This filter is only fired if the error is not already configured to be handled by WordPress core. As such,
108            * it exclusively allows adding further rules for which errors should be handled, but not removing existing
109            * ones.
110            *
111            * @since 5.2.0
112            *
113            * @param bool  $should_handle_error Whether the error should be handled by the fatal error handler.
114            * @param array $error               Error information retrieved from error_get_last().
115            */
116           return (bool) apply_filters( 'wp_should_handle_php_error', false, $error );
117      }
118
119      /**
120       * Displays the PHP error template and sends the HTTP status code, typically 500.
121       *
122       * A drop-in 'php-error.php' can be used as a custom template. This drop-in should control the HTTP status code and
123       * print the HTML markup indicating that a PHP error occurred. Note that this drop-in may potentially be executed
124       * very early in the WordPress bootstrap process, so any core functions used that are not part of
125       * `wp-includes/load.php` should be checked for before being called.