[wp-trac] [WordPress Trac] #58342: Use register_block_type_from_metadata in register_core_block_types_from_metadata

WordPress Trac noreply at wordpress.org
Wed May 17 11:10:46 UTC 2023


#58342: Use register_block_type_from_metadata in
register_core_block_types_from_metadata
--------------------------+----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Editor        |    Version:  5.5
 Severity:  normal        |   Keywords:  good-first-bug
  Focuses:  performance   |
--------------------------+----------------------------
 In `register_core_block_types_from_metadata` function,
 `register_block_type` is called. This does a file_exists check and then
 calls `register_block_type_from_metadata`. However,
 `register_block_type_from_metadata` can be called directly with the same
 effect. This saves around 21 files exists checks and results in improved
 performance.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58342>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list