[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 13:00:00 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          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+------------------------------

Comment (by manzoorwani.jk):

 Thank you for the valuable inputs @birgire

 I have made the changes pointed out by you and also moved the dynamic
 filter after the general filter which seems to be a better place for a
 dynamic filter unlike hooks, couldn't find an example from the core.

 Also, about the number of characters in a filter tag, I found
 [https://wordpress.stackexchange.com/questions/155888/apply-filters-do-
 action-tag-characters-limit your own answer] 🙂

 As far as the allowed characters in a filter are concerned, WordPress
 [https://developer.wordpress.org/reference/classes/wp_block_type_registry/register/
 is stricter] when it comes to a block name, so it should be pretty fine to
 use a block name in a dynamic filter, provided `/` between `namespace` and
 `block` is not a problem.

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


More information about the wp-trac mailing list