Skip to content

Commit 5d9e948

Browse files
authored
Only replace original render callback if not set
1 parent f2ac2cf commit 5d9e948

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Gutenberg/Block_Type.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ class Block_Type extends \WP_Block_Type {
2323
*/
2424
public function __construct( $block_type, $args = array() ) {
2525
parent::__construct( $block_type, $args );
26-
$this->original_render_callback = $this->render_callback;
26+
if ( empty( $this->original_render_callback ) ) {
27+
$this->original_render_callback = $this->render_callback;
28+
}
2729
$this->render_callback = array( $this, 'clarkson_render_callback' );
2830
}
2931

0 commit comments

Comments
 (0)