Making WordPress.org


Ignore:
Timestamp:
02/08/2022 09:28:48 PM (3 years ago)
Author:
coffee2code
Message:

Handbooks, ToC: Output CSS before potentially bailing early due to handbook_display_toc filter.

Props juanmaguitar, tobifjellner, coffee2code.
Fixes #5930.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php

    r11390 r11532  
    126126
    127127        // Replace each level of the headings.
     128        $content .= $this->styles . "\n";
    128129        $content = $this->add_ids_and_jumpto_links( $items, $content );
    129130
     
    133134
    134135        $contents_header = 'h' . reset( $items )['level']; // Duplicate the first <h#> tag in the document for the TOC header
    135         $toc            .= $this->styles;
    136136        $toc            .= '<div class="table-of-contents">';
    137137        $toc            .= "<$contents_header>" . esc_html( $this->args->header_text ) . "</$contents_header><ul class=\"items\">";
Note: See TracChangeset for help on using the changeset viewer.