# wp_should_load_block_editor_scripts_and_styles()

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

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

## Сигнатура

```php
wp_should_load_block_editor_scripts_and_styles(): bool
```

## Описание

Проверяет, следует ли ставить в очередь подключения скрипты и стили редактора для всех зарегистрированных типов блоков на текущем экране.

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

`bool`

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

Файл: `wp-includes/script-loader.php:2659`

```php
function wp_should_load_block_editor_scripts_and_styles() {
	global $current_screen;

	$is_block_editor_screen = ( $current_screen instanceof WP_Screen ) && $current_screen->is_block_editor();

	/**
	 * Filters the flag that decides whether or not block editor scripts and styles
	 * are going to be enqueued on the current screen.
	 *
	 * @since 5.6.0
	 *
	 * @param bool $is_block_editor_screen Current value of the flag.
	 */
	return apply_filters( 'should_load_block_editor_scripts_and_styles', $is_block_editor_screen );
}
```

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

- 5.6.0 — Introduced.

## Связанные

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

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