From 0c0945161e4764141400b901824f179287884816 Mon Sep 17 00:00:00 2001 From: Menno van den Ende <50165380+menno-ll@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:07:28 +0100 Subject: [PATCH] Apply fix by christiaan Apply fix from https://github.com/level-level/Clarkson-Core/pull/262 --- lib/clarkson-core-gutenberg-block-type.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/clarkson-core-gutenberg-block-type.php b/lib/clarkson-core-gutenberg-block-type.php index e699b1c..d5813ce 100644 --- a/lib/clarkson-core-gutenberg-block-type.php +++ b/lib/clarkson-core-gutenberg-block-type.php @@ -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; @@ -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; }