WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/18/2018 11:53:49 AM (2 years ago)
Author:
pento
Message:

Blocks: Parse blocks when displaying posts.

Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

See #45109.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/formatting.php

    r43732 r43752  
    442442    if ( trim($pee) === '' )
    443443        return '';
     444
     445    // We don't need to autop posts with blocks in them.
     446    if ( has_blocks( $pee ) ) {
     447        return $pee;
     448    }
    444449
    445450    // Just to make things a little easier, pad the end.
     
    33723377
    33733378        $text = strip_shortcodes( $text );
     3379        $text = strip_dynamic_blocks( $text );
    33743380
    33753381        /** This filter is documented in wp-includes/post-template.php */
Note: See TracChangeset for help on using the changeset viewer.