[wp-trac] [WordPress Trac] #46187: Add a dynamic hook to filter the content of a single block.
WordPress Trac
noreply at wordpress.org
Tue Feb 5 09:50:50 UTC 2019
#46187: Add a dynamic hook to filter the content of a single block.
----------------------------+-----------------------------
Reporter: manzoorwani.jk | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
`render_block` filter in `render_block()` is very helpful. It would be
good to have a dynamic hook (`render_block_{$block_name}`) to filter only
the content of a specific block, to avoid the need of using the
conditionals inside the filter callback.
`register_block_type()` does provide an option to pass `render_callback`
but still that's not useful when you are not the creator of the block.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46187>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list