Make WordPress Core

Changeset 51849


Ignore:
Timestamp:
09/22/2021 02:09:19 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Update description for retrieve_widgets() per the documentation standards.

Follow-up to [51842].

See #53811.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets.php

    r51842 r51849  
    12561256
    12571257/**
    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.
    12601260 *
    12611261 * 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).
    12671269 *
    12681270 * @since 2.8.0
Note: See TracChangeset for help on using the changeset viewer.