Skip to content

Commit

Permalink
Apply fix by christiaan
Browse files Browse the repository at this point in the history
Apply fix from #262
  • Loading branch information
menno-ll authored Nov 9, 2023
1 parent a5a35d4 commit 0c09451
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/clarkson-core-gutenberg-block-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ public function get_twig_template_path() {
* exists it falls back to the original render callback.
* @param array $attributes Block attributes.
* @param string $content Block content.
* @param \WP_Block|null $block WP Block object.
* @return string Rendered block type output.
*/
public function clarkson_render_callback( $attributes, $content ) {
public function clarkson_render_callback( $attributes, $content, $block = null ) {
if ( file_exists( $this->get_twig_template_path() ) ) {
$cc_template = Clarkson_Core_Templates::get_instance();
$this->content_attributes = $attributes;
Expand All @@ -91,7 +92,7 @@ public function clarkson_render_callback( $attributes, $content ) {
);
}
if ( is_callable( $this->original_render_callback ) ) {
return (string) call_user_func( $this->original_render_callback, $attributes, $content, $this );
return (string) call_user_func( $this->original_render_callback, $attributes, $content, $block );
}
return $content;
}
Expand Down

0 comments on commit 0c09451

Please sign in to comment.