Make WordPress Core


Ignore:
Timestamp:
12/13/2018 06:11:10 PM (6 years ago)
Author:
desrosj
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.

Props pento.

Merges [43752] to trunk.

See #45109.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/formatting.php

    r43571 r44118  
    457457    if ( trim( $pee ) === '' ) {
    458458        return '';
     459    }
     460
     461    // We don't need to autop posts with blocks in them.
     462    if ( has_blocks( $pee ) ) {
     463        return $pee;
    459464    }
    460465
     
    36363641
    36373642        $text = strip_shortcodes( $text );
     3643        $text = strip_dynamic_blocks( $text );
    36383644
    36393645        /** This filter is documented in wp-includes/post-template.php */
Note: See TracChangeset for help on using the changeset viewer.