Refactor gutenberg_initialize_editor function and remove block_editor_preload_data filter - #35838
Merged
anton-vlasenko merged 6 commits intoOct 25, 2021
Merged
Conversation
anton-vlasenko
requested review from
TimothyBJacobs and
spacedmonkey
as code owners
October 21, 2021 15:26
gutenberg_initialize_editor function and remove block_editor_preload_data filter
anton-vlasenko
force-pushed
the
fix/remove-block_editor_preload_data-filter
branch
from
October 22, 2021 13:19
c6bba65 to
81ebbe6
Compare
Contributor
Author
|
@TimothyBJacobs @spacedmonkey |
…vide data for `createMenuPreloadingMiddleware`.
This is needed to remove the block_editor_preload_data filter.
anton-vlasenko
force-pushed
the
fix/remove-block_editor_preload_data-filter
branch
from
October 22, 2021 15:06
479de19 to
95fa26b
Compare
7 tasks
TimothyBJacobs
approved these changes
Oct 22, 2021
TimothyBJacobs
left a comment
Member
There was a problem hiding this comment.
Thanks this looks great!
anton-vlasenko
deleted the
fix/remove-block_editor_preload_data-filter
branch
October 25, 2021 11:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is a follow-up to #24642.
Fixes #35803
We've added
block_editor_preload_datafilter to thegutenberg_initialize_editorfunction in the scope of #35402.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_editorto not use that filter.How has this been tested?
wp-admin/admin.php?page=gutenberg-navigation).Screenshots
Screenshots
Types of changes
New feature
Checklist:
*.native.jsfiles for terms that need renaming or removal).