mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51705 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -805,7 +805,7 @@ function switch_theme( $stylesheet ) {
|
||||
add_option( "theme_mods_$stylesheet", $default_theme_mods );
|
||||
} else {
|
||||
/*
|
||||
* Since retrieve_widgets() is called when initializing a theme in the Customizer,
|
||||
* Since sync_registered_widgets() is called when initializing a theme in the Customizer,
|
||||
* we need to remove the theme mods to avoid overwriting changes made via
|
||||
* the Customizer when accessing wp-admin/widgets.php.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user