block_editor_settings_all хук-фильтрWP 5.8.0

Filters the settings to pass to the block editor for all editor type.

Использование

add_filter( 'block_editor_settings_all', 'wp_kama_block_editor_settings_all_filter', 10, 2 );

/**
 * Function for `block_editor_settings_all` filter-hook.
 * 
 * @param array                   $editor_settings      Default editor settings.
 * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
 *
 * @return array
 */
function wp_kama_block_editor_settings_all_filter( $editor_settings, $block_editor_context ){

	// filter...
	return $editor_settings;
}
$editor_settings(массив)
Default editor settings.
$block_editor_context(WP_Block_Editor_Context)
The current block editor context.

Список изменений

С версии 5.8.0 Введена.

Где вызывается хук

get_block_editor_settings()
block_editor_settings_all
wp-includes/block-editor.php 544
$editor_settings = apply_filters( 'block_editor_settings_all', $editor_settings, $block_editor_context );

Где используется хук в WordPress

wp-includes/default-filters.php 574
add_filter( 'block_editor_settings_all', 'wp_add_editor_classic_theme_styles' );