![Announcement icon Announcement icon](https://www.drupal.org/files/styles/grid-2-2x-square/public/announcements/drupal-evergreen-logo-280X280px%20%281%29_0.jpg?itok=PHpn6rCb)
Problem/Motivation
In Wordpress you can alter the raw block content before it's rendered using the render_block filter. It would be nice to have this for Drupal as well with an alter hook.
Proposed resolution
Invoke an alter hook in the GutenbergFilter::renderBlock()
method just before returning the $block_content
. MR incoming!
Issue fork gutenberg-3447741
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
drclaw CreditAttribution: drclaw at Fuse Interactive commentedMR Submitted!
I tried to keep it close to the wordpress filter so the naming "..._render_block_...", as well as the parameter order. Let me know what you think!
Thanks!
drclaw
Comment #4
marcofernandes CreditAttribution: marcofernandes at Frontkom commented