[wp-trac] [WordPress Trac] #52138: Editor: Support filtering arguments in block type registration from metadata

WordPress Trac noreply at wordpress.org
Fri Jan 8 16:34:32 UTC 2021


#52138: Editor: Support filtering arguments in block type registration from
metadata
--------------------------------------+---------------------
 Reporter:  gziolo                    |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  5.7
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by gziolo):

 > I'm 100% sure we need the first one. In terms of adding the second one
 I'm open to discussion since it might duplicate the scope of
 `register_block_type_args` with the only difference that it contains also
 the metadata object as an argument passed for processing.

 I was thinking about that, I think that both filters make sense. The one
 that is called just before `register_block_type` call is very important
 from the perspective of Gutenberg as it's the only way to map new values
 added to `block.json` file in the plugin into values that are going to be
 passed as settings object to `register_block_type` call.

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


More information about the wp-trac mailing list