Make WordPress Core


Ignore:
Timestamp:
01/18/2020 12:52:28 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve comments in some wp-admin files per the documentation standards.

Props passoniate.
Fixes #49215, #49216.

File:
1 edited

Legend:

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

    r45583 r47084  
    209209        $i++;
    210210
    211         if ( 0 == $order ) { // dashboard is always shown/single
     211        if ( 0 == $order ) { // Dashboard is always shown/single.
    212212            $menu[0][4] = add_cssclass( 'menu-top-first', $top[4] );
    213213            $lastorder  = 0;
     
    215215        }
    216216
    217         if ( 0 === strpos( $top[2], 'separator' ) && false !== $lastorder ) { // if separator
     217        if ( 0 === strpos( $top[2], 'separator' ) && false !== $lastorder ) { // If separator.
    218218            $first                 = true;
    219219            $c                     = $menu[ $lastorder ][4];
     
    228228        }
    229229
    230         if ( $mc == $i ) { // last item
     230        if ( $mc == $i ) { // Last item.
    231231            $c                 = $menu[ $order ][4];
    232232            $menu[ $order ][4] = add_cssclass( 'menu-top-last', $c );
     
    246246}
    247247
    248 uksort( $menu, 'strnatcasecmp' ); // make it all pretty
     248uksort( $menu, 'strnatcasecmp' ); // Make it all pretty.
    249249
    250250/**
     
    311311}
    312312
    313 // Prevent adjacent separators
     313// Prevent adjacent separators.
    314314$prev_menu_was_separator = false;
    315315foreach ( $menu as $id => $data ) {
    316316    if ( false === stristr( $data[4], 'wp-menu-separator' ) ) {
    317317
    318         // This item is not a separator, so falsey the toggler and do nothing
     318        // This item is not a separator, so falsey the toggler and do nothing.
    319319        $prev_menu_was_separator = false;
    320320    } else {
    321321
    322         // The previous item was a separator, so unset this one
     322        // The previous item was a separator, so unset this one.
    323323        if ( true === $prev_menu_was_separator ) {
    324324            unset( $menu[ $id ] );
    325325        }
    326326
    327         // This item is a separator, so truthy the toggler and move on
     327        // This item is a separator, so truthy the toggler and move on.
    328328        $prev_menu_was_separator = true;
    329329    }
Note: See TracChangeset for help on using the changeset viewer.