Skip to content

Commit

Permalink
Only replace original render callback if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
menno-ll authored Jun 24, 2024
1 parent f2ac2cf commit 5d9e948
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Gutenberg/Block_Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class Block_Type extends \WP_Block_Type {
*/
public function __construct( $block_type, $args = array() ) {
parent::__construct( $block_type, $args );
$this->original_render_callback = $this->render_callback;
if ( empty( $this->original_render_callback ) ) {
$this->original_render_callback = $this->render_callback;
}
$this->render_callback = array( $this, 'clarkson_render_callback' );
}

Expand Down

0 comments on commit 5d9e948

Please sign in to comment.