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

WordPress Trac noreply at wordpress.org
Tue Aug 31 19:57:33 UTC 2021


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

Comment (by hellofromTonya):

 In [changeset:"51705" 51705]:
 {{{
 #!CommitTicketReference repository="" revision="51705"
 Widgets: Rename and soft deprecate `retrieve_widgets()`.

 The original name `retrieve_widgets()` was unclear as it suggested it was
 a getter, i.e. getting the widgets. This function does more than get:
 finds orphaned widgets, assigns them to the inactive sidebar, and updates
 the database.

 The new name is `sync_registered_widgets()` which better represents what
 happens when this function is invoked.

 The original `retrieve_widgets()` function is soft deprecated to avoid
 unnecessary code churn downstream for developers that support more than
 the latest version of WordPress.

 Follow-up to [18630].

 Props zieladam, timothyblynjacobs, andraganescu, hellofromTonya.
 See #53811.
 }}}

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


More information about the wp-trac mailing list