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