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:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/phpunit/tests/blocks/render.php

    r43752 r44118  
    106106            array( $this, 'pass_parser_fixture_filenames' ),
    107107            $fixture_filenames
    108         );  }
     108        );  }
    109109
    110110    /**
     
    113113     */
    114114    public function test_do_block_output( $html_filename, $server_html_filename ) {
    115         $html_path         = self::$fixtures_dir . '/' . $html_filename;
     115        $html_path        = self::$fixtures_dir . '/' . $html_filename;
    116116        $server_html_path = self::$fixtures_dir . '/' . $server_html_filename;
    117117
     
    286286    public function render_test_block_wp_query() {
    287287        $content = '';
    288         $recent  = new WP_Query( array(
    289             'numberposts'      => 10,
    290             'orderby'          => 'ID',
    291             'order'            => 'DESC',
    292             'post_type'        => 'post',
    293             'post_status'      => 'draft, publish, future, pending, private',
    294             'suppress_filters' => true,
    295         ) );
     288        $recent  = new WP_Query(
     289            array(
     290                'numberposts'      => 10,
     291                'orderby'          => 'ID',
     292                'order'            => 'DESC',
     293                'post_type'        => 'post',
     294                'post_status'      => 'draft, publish, future, pending, private',
     295                'suppress_filters' => true,
     296            )
     297        );
    296298
    297299        while ( $recent->have_posts() ) {
Note: See TracChangeset for help on using the changeset viewer.