[wp-trac] [WordPress Trac] #45290: The equivalent of `gutenberg_wpautop` from Gutenberg plugin is missing in the 5.0 beta
WordPress Trac
noreply at wordpress.org
Wed Nov 7 03:46:42 UTC 2018
#45290: The equivalent of `gutenberg_wpautop` from Gutenberg plugin is missing in
the 5.0 beta
----------------------------------------------------+---------------------
Reporter: nerrad | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 5.0
Component: Editor | Version: 5.0
Severity: major | Resolution:
Keywords: has-patch needs-testing has-unit-tests | Focuses:
----------------------------------------------------+---------------------
Changes (by pento):
* keywords: dev-feedback has-patch needs-testing => has-patch needs-
testing has-unit-tests
Comment:
Thank you for the patch and further research, @nerrad! You're absolutely
right that this change in behaviour was an oversight during merging.
I agree that `do_blocks()` needs to be run before other things in
`the_content` run, but I don't think that changing the priority of
`wpautop()` is a viable option, as many plugins assume it runs at priority
10. Changing it will cause subtle issues like the one @mkaz mentioned, or
problems like `remove_action( 'the_content', 'wpautop' )` no longer
working as it has in the past.
[attachment:"45290.2.diff"] is an attempt to work around this: when
`do_blocks()` is run, it decides if it needs to remove `wpautop()`, does
so, then schedules a filter to re-add it immediately after it would've
run.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45290#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list