WP HOOKS
filtrod 5.2.0

wp_php_error_args

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

Opis — z kodu źródłowego

Filters the arguments passed to {@see wp_die()} for the default PHP error template.

Parametry

ParametrTypOpis
$argsarrayAssociative array of arguments passed to <code>wp_die()</code>. By default these contain a 'response' key, and optionally 'link_url' and 'link_text' keys.
$errorarrayError information retrieved from <code>error_get_last()</code>.

Wywołanie

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

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

Popularne w tej kategorii