Changeset 51849
- Timestamp:
- 09/22/2021 02:09:19 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r51842 r51849 1256 1256 1257 1257 /** 1258 * Validates and remaps any "orphaned" widgets to wp_inactive_ sidgets sidebar, and saves the widget settings.1259 * This has to run at least on each theme change.1258 * Validates and remaps any "orphaned" widgets to wp_inactive_widgets sidebar, 1259 * and saves the widget settings. This has to run at least on each theme change. 1260 1260 * 1261 1261 * For example, let's say theme A has a "footer" sidebar, and theme B doesn't have one. 1262 * After switching from theme A to theme B, all the widgets previously assigned to the footer would be inaccessible. 1263 * This function detects this scenario, and moves all the widgets previously assigned to the footer under wp_inactive_widgets. 1264 * 1265 * Despite the word "retrieve" in the name, this function actually updates the database and the global $sidebars_widgets. 1266 * For that reason it should not be run from the front end unless the param value is 'customize' (to bypass the database write). 1262 * After switching from theme A to theme B, all the widgets previously assigned 1263 * to the footer would be inaccessible. This function detects this scenario, and 1264 * moves all the widgets previously assigned to the footer under wp_inactive_widgets. 1265 * 1266 * Despite the word "retrieve" in the name, this function actually updates the database 1267 * and the global `$sidebars_widgets`. For that reason it should not be run on front end, 1268 * unless the `$theme_changed` value is 'customize' (to bypass the database write). 1267 1269 * 1268 1270 * @since 2.8.0
Note: See TracChangeset
for help on using the changeset viewer.