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