[wp-trac] [WordPress Trac] #53816: Overview: Refactor the widgets read/write logic

WordPress Trac noreply at wordpress.org
Fri Aug 27 15:11:17 UTC 2021

#53816: Overview: Refactor the widgets read/write logic
 Reporter:  zieladam                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  5.8.1
Component:  Widgets                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note needs-docs                                |

Comment (by zieladam):

 Devnote for posterity:

 In [https://core.trac.wordpress.org/ticket/53816 #53816] the
 `retrieve_widgets` function was deprecated in favor of a new function with
 the same signature: `sync_registered_widgets`. The existing code relying
 on `retrieve_widgets` will continue to work without any PHP notices – this
 deprecation is merely a documentation change.

 The old name `retrieve_widgets` suggested that the function merely reads a
 value. In reality, it updates the database. This discrepancy was confusing
 for developers. The new name reflects the actual behavior more accurately.

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

More information about the wp-trac mailing list