wp_php_error_args
Filters the arguments passed to wp_die() for the default PHP error template.
Использование
add_filter( 'wp_php_error_args', 'wp_kama_php_error_args_filter', 10, 2 ); /** * Function for `wp_php_error_args` filter-hook. * * @param array $args Associative array of arguments passed to `wp_die()`. By default these contain a 'response' key, and optionally 'link_url' and 'link_text' keys. * @param array $error Error information retrieved from `error_get_last()`. * * @return array */ function wp_kama_php_error_args_filter( $args, $error ){ // filter... return $args; }
- $args(массив)
- Associative array of arguments passed to wp_die(). By default these contain a 'response' key, and optionally 'link_url' and 'link_text' keys.
- $error(массив)
- Error information retrieved from error_get_last().
Список изменений
С версии 5.2.0 | Введена. |
Где вызывается хук
wp_php_error_args
wp-includes/class-wp-fatal-error-handler.php 235
$args = apply_filters( 'wp_php_error_args', $args, $error );