should_load_block_editor_scripts_and_styles WordPress Filter Hook

The should_load_block_editor_scripts_and_styles hook is a WordPress hook that allows you to conditionally load Block Editor scripts and styles. This hook is useful if you want to load Block Editor scripts and styles only on certain pages or if you want to load them conditionally based on some other criteria.

apply_filters( 'should_load_block_editor_scripts_and_styles', bool $is_block_editor_screen ) #

Filters the flag that decides whether or not block editor scripts and styles are going to be enqueued on the current screen.


Parameters

$is_block_editor_screen

(bool)Current value of the flag.


Top ↑

Source

File: wp-includes/script-loader.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More