Created
August 2, 2022 07:22
-
-
Save vanpariyar/da6dc5123c7c2fe6bfeb7aef25469e7e to your computer and use it in GitHub Desktop.
change gutenberg block's render callback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('register_block_type_args', function ($settings, $name) { | |
if ($name == 'demo/content-with-sidebar') { | |
$settings['render_callback'] = 'demo_blocks_content_with_sidebar'; | |
} | |
return $settings; | |
}, null, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment