[wp-trac] [WordPress Trac] #46187: Add a dynamic hook to filter the content of a single block.

WordPress Trac noreply at wordpress.org
Tue Nov 24 03:25:19 UTC 2020


#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           |  Resolution:
 Keywords:  has-patch close  |     Focuses:
-----------------------------+------------------------------
Changes (by noisysocks):

 * keywords:  has-patch => has-patch close


Comment:

 Hey, thanks for the patch. What's the benefit of a dynamic filter name as
 opposed to using `render_block` and checking `$block['blockName']`?

 In my opinion it is not worth doing this given that there is a sensible
 alternative and given that it is confusing that the dynamic part of the
 filter name would nearly never match the block's name, e.g. `core/image`
 would have to become `core_image`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46187#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list