should_load_block_editor_scripts_and_styles
Filter HookDescription
Filters the flag that decides whether or not block editor scripts and styles are going to be enqueued on the current screen.Hook Information
File Location |
wp-includes/script-loader.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2593 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$is_block_editor_screen
|
Current value of the flag. |
Usage Examples
Basic Usage
<?php
// Hook into should_load_block_editor_scripts_and_styles
add_filter('should_load_block_editor_scripts_and_styles', 'my_custom_filter', 10, 1);
function my_custom_filter($is_block_editor_screen) {
// Your custom filtering logic here
return $is_block_editor_screen;
}
Source Code Context
wp-includes/script-loader.php:2593
- How this hook is used in WordPress core
<?php
2588 *
2589 * @since 5.6.0
2590 *
2591 * @param bool $is_block_editor_screen Current value of the flag.
2592 */
2593 return apply_filters( 'should_load_block_editor_scripts_and_styles', $is_block_editor_screen );
2594 }
2595
2596 /**
2597 * Checks whether separate styles should be loaded for core blocks.
2598 *
PHP Documentation
<?php
/**
* 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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/script-loader.php
Related Hooks
Related hooks will be displayed here in future updates.