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

WordPress Trac noreply at wordpress.org
Wed Jul 28 11:10:29 UTC 2021


#53811: Rename `retrieve_widgets` to `recover_lost_widgets`
--------------------------+-----------------------------
 Reporter:  zieladam      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------------
 We have a function called `retrieve_widgets`. The name suggests that it's
 a getter, yet it updates the database by assigning the orphaned widgets to
 an inactive sidebar.

 The name is misleading and it bit us in
 https://github.com/WordPress/gutenberg/issues/33335#issuecomment-879903958
 and https://core.trac.wordpress.org/ticket/53657.

 I propose we deprecate the current name and move forward with a new one
 which communicates the intention in a clearer way: `recover_lost_widgets`.

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


More information about the wp-trac mailing list