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

WordPress Trac noreply at wordpress.org
Tue Aug 31 20:20:34 UTC 2021


#53811: Rename `retrieve_widgets` to `sync_registered_widgets`
---------------------------------------------+-----------------------------
 Reporter:  zieladam                         |       Owner:  hellofromTonya
     Type:  defect (bug)                     |      Status:  reopened
 Priority:  normal                           |   Milestone:  5.8.1
Component:  Widgets                          |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Description changed by hellofromTonya:

Old description:

> 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`.

New description:

 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 #53657.

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

 Part of the epic ticket #53816.

--

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


More information about the wp-trac mailing list