[wp-trac] [WordPress Trac] #59551: Respect non-null values from the `pre_render_block` filter
WordPress Trac
noreply at wordpress.org
Tue Nov 14 02:13:28 UTC 2023
#59551: Respect non-null values from the `pre_render_block` filter
--------------------------+------------------------------
Reporter: danieliser | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 6.0
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by dmsnell):
maybe these core filters should be registered as `add_action()` instead of
`add_filter()`?
> But I'm weary of Dennis' "additional caveat", because I can imagine a
plugin rendering a block almost like it would "normally" but maybe adding
a data-xyz attribute to some HTML element...and expecting core to have
output the styles it would normally do.
I'm not following this, but I guess I misunderstood this whole thing
myself in assuming `null` meant "no more block" - feels like double
negatives here 😅
so yeah, ignore that additional thing or maybe instead of `null ===
$pre_render` it should be `'' === $pre_render` - all I meant to do was
have Core skip any enqueued styles if the block has been removed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59551#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list