Making WordPress.org

Changeset 9492


Ignore:
Timestamp:
02/11/2020 07:19:45 PM (7 years ago)
Author:
coffee2code
Message:

Support Hub, ToC: Fix so markup for ToC subitems are nested under parent items instead of being their peer.

Props milana_cap.
See #4692.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/table-of-contents-lite/includes/class-table-of-contents-lite.php

    r8255 r9492  
    245245                        $last_item       = false;
    246246                        foreach ( $items as $item ) {
    247                                 $last_item = $item[2];
    248247                                if ( $last_item ) {
    249248                                        if ( $last_item < $item[2] ) {
     
    255254                                        }
    256255                                }
     256                                $last_item = $item[2];
    257257                                $toc .= sprintf( '<li><a href="#%1s">%2s</a>', sanitize_title_with_dashes( $item[3] ), $item[3] );
    258258                        }
Note: See TracChangeset for help on using the changeset viewer.