Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update class-wp-block.php
  • Loading branch information
carlomanf authored Nov 13, 2020
commit 7569d818e12bd8e8e1575174a1d27190755ddd9b
11 changes: 4 additions & 7 deletions lib/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,9 @@ public function __get( $name ) {
* @return string Rendered block output.
*/
public function render( $options = array() ) {
if ( in_array( $this->parsed_block, self::$currently_rendering ) )
{
if ( in_array( $this->parsed_block, self::$currently_rendering ) ) {
return '';
}
else
{
} else {
self::$currently_rendering[] = $this->parsed_block;
}

Expand Down Expand Up @@ -253,11 +250,11 @@ public function render( $options = array() ) {
}

/** This filter is documented in src/wp-includes/blocks.php */
$return = apply_filters( 'render_block', $block_content, $this->parsed_block );
$block_content = apply_filters( 'render_block', $block_content, $this->parsed_block );

array_pop( self::$currently_rendering );

return $return;
return $block_content;
}

}