mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Formatting: Ensure wpautop() isn't run on content generated from blocks.
As `do_blocks()` is run before `wpautop()` in the_content filter, we can remove in a Just In Time fashion, before that filter is run. After `wpautop()`s original priority has passed, we can re-add it in a Just Too Late fashion, to ensure it's available if `the_content` filter is run multiple times on a page load. Merges [43879] and [43881] from the 5.0 branch to trunk. Props pento, nerrad. Fixes #45290. git-svn-id: https://develop.svn.wordpress.org/trunk@44226 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -458,11 +458,6 @@ function wpautop( $pee, $br = true ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// We don't need to autop posts with blocks in them.
|
||||
if ( has_blocks( $pee ) ) {
|
||||
return $pee;
|
||||
}
|
||||
|
||||
// Just to make things a little easier, pad the end.
|
||||
$pee = $pee . "\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user