[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
Tue Nov 6 22:00:03 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: dev-feedback has-patch needs-testing | Focuses:
--------------------------------------------------+---------------------
Comment (by nerrad):
> Would it be possible to change the priority on the do_blocks call
instead of wpautop? Since that's the new element?
Don't take this as a definitive answer, but I think the reason `do_blocks`
is at an earlier priority is because the intent is to ensure block parsing
is handled before any other `wp_content` filter callbacks. This allows
the blocks to be parsed out of the content and have their serialized data
removed from `wp_content` reducing the potential mangling of the
serialization by other callbacks hooking into post_content.
I think a more solid long term solution might be to parse blocks from
`the_content` field as soon as its retrieved from the db rather than on
the fly via `the_content` (maybe set a `has_blocks` property on
`WP_Post`?). That way it guarantees we have unadulterated block data.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45290#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list