From a016bf3172480021358e2e66f93aeecbbc7d90aa Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 22 Sep 2021 14:11:00 +0000 Subject: [PATCH] Docs: Update description for `retrieve_widgets()` per the documentation standards. Follow-up to [51842]. See #53811. Built from https://develop.svn.wordpress.org/trunk@51849 git-svn-id: http://core.svn.wordpress.org/trunk@51448 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 565d9e8eed..2dc15dcd63 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51842'; +$wp_version = '5.9-alpha-51849'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 1102105c8d..10f5017957 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -1255,15 +1255,17 @@ function _wp_sidebars_changed() { } /** - * Validates and remaps any "orphaned" widgets to wp_inactive_sidgets sidebar, and saves the widget settings. - * This has to run at least on each theme change. + * Validates and remaps any "orphaned" widgets to wp_inactive_widgets sidebar, + * and saves the widget settings. This has to run at least on each theme change. * * For example, let's say theme A has a "footer" sidebar, and theme B doesn't have one. - * After switching from theme A to theme B, all the widgets previously assigned to the footer would be inaccessible. - * This function detects this scenario, and moves all the widgets previously assigned to the footer under wp_inactive_widgets. + * After switching from theme A to theme B, all the widgets previously assigned + * to the footer would be inaccessible. This function detects this scenario, and + * moves all the widgets previously assigned to the footer under wp_inactive_widgets. * - * Despite the word "retrieve" in the name, this function actually updates the database and the global $sidebars_widgets. - * For that reason it should not be run from the front end unless the param value is 'customize' (to bypass the database write). + * Despite the word "retrieve" in the name, this function actually updates the database + * and the global `$sidebars_widgets`. For that reason it should not be run on front end, + * unless the `$theme_changed` value is 'customize' (to bypass the database write). * * @since 2.8.0 *