[wp-trac] [WordPress Trac] #60787: get_registered_meta_keys() should allow for late registration to improve performance

WordPress Trac noreply at wordpress.org
Sat Mar 16 04:15:36 UTC 2024


#60787: get_registered_meta_keys() should allow for late registration to improve
performance
-------------------------+------------------------------
 Reporter:  sc0ttkclark  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+------------------------------

Comment (by sc0ttkclark):

 The work in https://github.com/WordPress/wordpress-develop/pull/6282
 introduces the new action.

 As a result of this new action, I saw that there was one other function
 that is not accounted for which is the default value filter.

 That function `filter_default_metadata()` was manually interacting with
 `$wp_meta_keys` in a way that prevented the action from being effective
 for default value handling. I adjusted that function to make use of the
 `get_registered_meta_keys()` function without changing the overall logic
 of that function beyond what it did before.

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


More information about the wp-trac mailing list