Skip to content

Commit

Permalink
Update Block_Container.php
Browse files Browse the repository at this point in the history
The issues missing Block variable: htmlburger#1244
  • Loading branch information
htmldiz authored Jul 29, 2024
1 parent 155346c commit cdf005f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/Container/Block_Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,21 +438,20 @@ public function get_post_id() {
*
* @param array $attributes
* @param string $content
* @param \WP_Block $block
* @return string
*/
public function render_block( $attributes, $content ) {
public function render_block( $attributes, $content, $block = null ) { // added variable at the end
$fields = $attributes['data'];
$post_id = $this->get_post_id();

// Unset the "data" property because we
// pass it as separate argument to the callback.
unset($attributes['data']);

ob_start();

call_user_func( $this->render_callback , $fields, $attributes, $content, $post_id );

return ob_get_clean();
call_user_func( $this->render_callback , $fields, $attributes, $content, $post_id, $block );
$toReturn = ob_get_contents();
ob_clean();
return $toReturn;
}

/**
Expand Down

0 comments on commit cdf005f

Please sign in to comment.