Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r46138 r47122  
    2323
    2424    foreach ( $sort as $widget ) {
    25         if ( in_array( $widget['callback'], $done, true ) ) { // We already showed this multi-widget
     25        if ( in_array( $widget['callback'], $done, true ) ) { // We already showed this multi-widget.
    2626            continue;
    2727        }
     
    143143    $params[0]['before_widget'] = "<div id='widget-{$i}_{$id}' class='widget'$hidden>";
    144144    $params[0]['after_widget']  = '</div>';
    145     $params[0]['before_title']  = '%BEG_OF_TITLE%'; // deprecated
    146     $params[0]['after_title']   = '%END_OF_TITLE%'; // deprecated
     145    $params[0]['before_title']  = '%BEG_OF_TITLE%'; // Deprecated.
     146    $params[0]['after_title']   = '%END_OF_TITLE%'; // Deprecated.
    147147
    148148    if ( is_callable( $wp_registered_widgets[ $widget_id ]['callback'] ) ) {
     
    193193    $widget_id  = $sidebar_args['widget_id'];
    194194    $sidebar_id = isset( $sidebar_args['id'] ) ? $sidebar_args['id'] : false;
    195     $key        = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[ $sidebar_id ] ) : '-1'; // position of widget in sidebar
     195    $key        = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[ $sidebar_id ] ) : '-1'; // Position of widget in sidebar.
    196196    $control    = isset( $wp_registered_widget_controls[ $widget_id ] ) ? $wp_registered_widget_controls[ $widget_id ] : array();
    197197    $widget     = $wp_registered_widgets[ $widget_id ];
     
    227227     */
    228228    if ( isset( $sidebar_args['_display'] ) && 'template' == $sidebar_args['_display'] && $widget_number ) {
    229         // number == -1 implies a template where id numbers are replaced by a generic '__i__'
     229        // number == -1 implies a template where id numbers are replaced by a generic '__i__'.
    230230        $control['params'][0]['number'] = -1;
    231231        // With id_base widget id's are constructed like {$id_base}-{$id_number}.
Note: See TracChangeset for help on using the changeset viewer.