[wp-trac] [WordPress Trac] #53811: Rename `retrieve_widgets` to `sync_registered_widgets`

WordPress Trac noreply at wordpress.org
Thu Sep 9 21:27:53 UTC 2021


#53811: Rename `retrieve_widgets` to `sync_registered_widgets`
--------------------------+-----------------------------
 Reporter:  zieladam      |       Owner:  hellofromTonya
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  5.9
Component:  Widgets       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  fixed-major   |     Focuses:
--------------------------+-----------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch has-unit-tests commit fixed-major => fixed-major


Comment:

 After discussing with @azaozz, @zieladam, and @andraganescu, decided to
 revert [51705]. Why?

 This function is 12 years old. While the new name is much better, it
 doesn't fully tell us what is happens when the function is invoked. Why?
 The function is doing too much. And naming is hard.

 This function is part of a bigger problem of globals and having to fix
 data when accessed/touched.

 Instead of renaming this function, a suggestion could be to explore
 improving the widgets read/write/in-memory state API. This type of
 enhancement is beyond the scope of this ticket.

 In the interim, @azaozz suggestion of improving the docs is an incremental
 quality improvement.

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


More information about the wp-trac mailing list