Refactor gutenberg_initialize_editor
function and remove block_editor_preload_data
filter
#35803
Labels
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
This issue is a follow-up to #24642.
We've added
block_editor_preload_data
filter to thegutenberg_initialize_editor
function.This filter is only needed to provide data for the
createMenuPreloadingMiddleware
.It's not the best solution because we don't want to add filters whose only task is to solve a specific (single) issue.
We can do better.
We need to refactor
gutenberg_initialize_editor
to not use that filter.What is your proposed solution?
Load the data needed for the
createMenuPreloadingMiddleware
sideways, somewhere inside thegutenberg_navigation_init
function and remove theblock_editor_preload_data
filter.The text was updated successfully, but these errors were encountered: