Filter hook 'block_editor_settings_all'

in WP Core File wp-includes/block-editor.php at line 663

View Source

block_editor_settings_all

Filter Hook
Description
Filters the settings to pass to the block editor for all editor type.

Hook Information

File Location wp-includes/block-editor.php View on GitHub
Hook Type Filter
Line Number 663

Hook Parameters

Type Name Description
array $editor_settings Default editor settings.
WP_Block_Editor_Context $block_editor_context The current block editor context.

Usage Examples

Basic Usage
<?php
// Hook into block_editor_settings_all
add_filter('block_editor_settings_all', 'my_custom_filter', 10, 2);

function my_custom_filter($editor_settings, $block_editor_context) {
    // Your custom filtering logic here
    return $editor_settings;
}

Source Code Context

wp-includes/block-editor.php:663 - How this hook is used in WordPress core
<?php
 658  	 * @since 5.8.0
 659  	 *
 660  	 * @param array                   $editor_settings      Default editor settings.
 661  	 * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
 662  	 */
 663  	$editor_settings = apply_filters( 'block_editor_settings_all', $editor_settings, $block_editor_context );
 664  
 665  	if ( ! empty( $block_editor_context->post ) ) {
 666  		$post = $block_editor_context->post;
 667  
 668  		/**

PHP Documentation

<?php
/**
	 * Filters the settings to pass to the block editor for all editor type.
	 *
	 * @since 5.8.0
	 *
	 * @param array                   $editor_settings      Default editor settings.
	 * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/block-editor.php
Related Hooks

Related hooks will be displayed here in future updates.