-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block API: Block Context: Remove block filter #21921
Merged
Merged
Conversation
This file contains 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
aduth
added
[Type] Bug
An existing feature does not function as intended
[Priority] High
Used to indicate top priority items that need quick attention
[Feature] Block API
API that allows to express the block paradigm.
labels
Apr 27, 2020
aduth
requested review from
ajitbohra,
jorgefilipecosta,
nerrad,
ntwb,
Soean,
talldan and
TimothyBJacobs
as code owners
April 27, 2020 13:14
Size Change: 0 B Total Size: 817 kB ℹ️ View Unchanged
|
youknowriad
reviewed
Apr 27, 2020
youknowriad
approved these changes
Apr 27, 2020
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Priority] High
Used to indicate top priority items that need quick attention
[Type] Bug
An existing feature does not function as intended
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.
Previously: #21868, #21467
This pull request seeks to revert more of the block context implementation introduced in #21467, effectively bypassing the
pre_render_block
filter introduced in #21467 altogether.This is being proposed as a combination of:
render_block
on inner blocks. The filter is only being run on the top-level blocks of a post content.WP_Block
class constructionrender_callback
not fully backward-compatible as array #21797 (comment)The pull request is proposed in a way which minimizes the changes necessary to bypass this filter to restore most of the behavior which existed prior to #21467. In doing so, it leaves some lingering unused code. This is done largely due to time constraints, given that Gutenberg 8.0.0RC is proposed to be published today (Monday April 27). It may be possible that this be refined in time for the final release, though it's not strictly necessary to do so.
Testing Instructions:
Repeat testing instructions from #21467. Optionally, it was made easier to test in later development of #21467, using the "Gutenberg Test Block Context" plugin included in the default development environment, via the associated "Test Context Provider" block.
To verify a fix of the issue reported in Slack:
render_block
filter somewhere in your local environment (see patch below)master
).