Skip to content

Instantly share code, notes, and snippets.

@vanpariyar
Created August 2, 2022 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanpariyar/da6dc5123c7c2fe6bfeb7aef25469e7e to your computer and use it in GitHub Desktop.
Save vanpariyar/da6dc5123c7c2fe6bfeb7aef25469e7e to your computer and use it in GitHub Desktop.
change gutenberg block's render callback
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