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/widgets.php

    r52361 r52362  
    520520 *                               Default 250.
    521521 *     @type int|string $id_base Required for multi-widgets, i.e widgets that allow multiple instances such as the
    522  *                               text widget. The widget id will end up looking like `{$id_base}-{$unique_number}`.
     522 *                               text widget. The widget ID will end up looking like `{$id_base}-{$unique_number}`.
    523523 * }
    524524 * @param mixed      ...$params        Optional additional parameters to pass to the callback function when it's called.
     
    19171917 * @since 5.8.0
    19181918 *
    1919  * @param string $widget_id The widget id to look for.
    1920  * @return string|null The found sidebar's id, or null if it was not found.
     1919 * @param string $widget_id The widget ID to look for.
     1920 * @return string|null The found sidebar's ID, or null if it was not found.
    19211921 */
    19221922function wp_find_widgets_sidebar( $widget_id ) {
     
    19371937 * @since 5.8.0
    19381938 *
    1939  * @param string $widget_id  The widget id to assign.
    1940  * @param string $sidebar_id The sidebar id to assign to. If empty, the widget won't be added to any sidebar.
     1939 * @param string $widget_id  The widget ID to assign.
     1940 * @param string $sidebar_id The sidebar ID to assign to. If empty, the widget won't be added to any sidebar.
    19411941 */
    19421942function wp_assign_widget_to_sidebar( $widget_id, $sidebar_id ) {
     
    19471947            if ( $widget_id === $maybe_widget_id && $sidebar_id !== $maybe_sidebar_id ) {
    19481948                unset( $sidebars[ $maybe_sidebar_id ][ $i ] );
    1949                 // We could technically break 2 here, but continue looping in case the id is duplicated.
     1949                // We could technically break 2 here, but continue looping in case the ID is duplicated.
    19501950                continue 2;
    19511951            }
Note: See TracChangeset for help on using the changeset viewer.