WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/20/2020 01:33:02 PM (6 months ago)
Author:
youknowriad
Message:

Block Editor: Update the WordPress Packages to the latest version.

This includes the packages that match the Gutenberg 9.2 Release.
It is going to be the last block-editor features update for WordPress 5.6.
It also updates the block-supports code base to the latest APIs.

Props isabel_brison, noisysocks, desrosj.
Fixes #51570.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block.php

    r48845 r49226  
    193193     */
    194194    public function render( $options = array() ) {
    195         global $post;
     195        global $post, $current_parsed_block;
    196196        $options = wp_parse_args(
    197197            $options,
     
    207207            $index = 0;
    208208            foreach ( $this->inner_content as $chunk ) {
    209                 $block_content .= is_string( $chunk ) ?
    210                     $chunk :
    211                     $this->inner_blocks[ $index++ ]->render();
     209                if ( is_string( $chunk ) ) {
     210                    $block_content .= $chunk;
     211                } else {
     212                    $parent_parsed_block  = $current_parsed_block;
     213                    $current_parsed_block = $this->inner_blocks[ $index ]->parsed_block;
     214                    $block_content       .= $this->inner_blocks[ $index++ ]->render();
     215                    $current_parsed_block = $parent_parsed_block;
     216                }
    212217            }
    213218        }
Note: See TracChangeset for help on using the changeset viewer.