Make WordPress Core


Ignore:
Timestamp:
12/13/2021 10:19:21 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Capitalize "ID", when referring to a widget ID or sidebar ID, in a more consistent way.

Follow-up to [48104], [52357], [52361].

See #53399.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php

    r52016 r52362  
    220220            foreach ( $sidebars as $sidebar_id => $widgets ) {
    221221                foreach ( $widgets as $i => $widget_id ) {
    222                     // This automatically removes the passed widget ids from any other sidebars in use.
     222                    // This automatically removes the passed widget IDs from any other sidebars in use.
    223223                    if ( $sidebar_id !== $request['id'] && in_array( $widget_id, $request['widgets'], true ) ) {
    224224                        unset( $sidebars[ $sidebar_id ][ $i ] );
    225225                    }
    226226
    227                     // This automatically removes omitted widget ids to the inactive sidebar.
     227                    // This automatically removes omitted widget IDs to the inactive sidebar.
    228228                    if ( $sidebar_id === $request['id'] && ! in_array( $widget_id, $request['widgets'], true ) ) {
    229229                        $sidebars['wp_inactive_widgets'][] = $widget_id;
Note: See TracChangeset for help on using the changeset viewer.