filtrod 5.2.0
wp_should_handle_php_error
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
| Parametr | Typ | Opis |
|---|---|---|
$should_handle_error | bool | Whether the error should be handled by the fatal error handler. |
$error | array | Error 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
}
// 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