WP HOOKS
filtrod 5.2.0

wp_should_handle_php_error

Args 2Plik wp-includes/class-wp-fatal-error-handler.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether a given thrown error should be handled by the fatal error handler.

This filter is only fired if the error is not already configured to be handled by WordPress core. As such, it exclusively allows adding further rules for which errors should be handled, but not removing existing ones.

Parametry

ParametrTypOpis
$should_handle_errorboolWhether the error should be handled by the fatal error handler.
$errorarrayError information retrieved from <code>error_get_last()</code>.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_should_handle_php_error', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii