# wp_is_fatal_error_handler_enabled()

URL: https://chugunov.pro/api-wordpress/functions/wp_is_fatal_error_handler_enabled/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 5.2.0.

## Сигнатура

```php
wp_is_fatal_error_handler_enabled(): bool
```

## Описание

Чтобы отключить его, можно задать константу WP_DISABLE_FATAL_ERROR_HANDLER в wp-config.php либо изменить возвращаемое значение с помощью фильтра «wp_fatal_error_handler_enabled».

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/error-protection.php:108`

```php
function wp_is_fatal_error_handler_enabled() {
	$enabled = ! defined( 'WP_DISABLE_FATAL_ERROR_HANDLER' ) || ! WP_DISABLE_FATAL_ERROR_HANDLER;

	/**
	 * Filters whether the fatal error handler is enabled.
	 *
	 * **Important:** This filter runs before it can be used by plugins. It cannot
	 * be used by plugins, mu-plugins, or themes. To use this filter you must define
	 * a `$wp_filter` global before WordPress loads, usually in `wp-config.php`.
	 *
	 * Example:
	 *
	 *     $GLOBALS['wp_filter'] = array(
	 *         'wp_fatal_error_handler_enabled' => array(
	 *             10 => array(
	 *                 array(
	 *                     'accepted_args' => 0,
	 *                     'function'      => function() {
	 *                         return false;
	 *                     },
	 *                 ),
	 *             ),
	 *         ),
	 *     );
	 *
	 * Alternatively you can use the `WP_DISABLE_FATAL_ERROR_HANDLER` constant.
	 *
	 * @since 5.2.0
	 *
	 * @param bool $enabled True if the fatal error handler is enabled, false otherwise.
	 */
	return apply_filters( 'wp_fatal_error_handler_enabled', $enabled );
}
```

## История изменений

- 5.2.0 — Introduced.

## Связанные

Использует: [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`wp_register_fatal_error_handler`](https://chugunov.pro/api-wordpress/functions/wp_register_fatal_error_handler/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_is_fatal_error_handler_enabled/
