Making WordPress.org


Ignore:
Timestamp:
01/09/2018 11:32:12 AM (9 years ago)
Author:
pento
Message:

Handbook: Add a filter to hide the Table of Contents.

File:
1 edited

Legend:

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

    r3726 r6322  
    7878                        $content = $this->add_ids_and_jumpto_links( "h$i", $content );
    7979
     80                if ( ! apply_filters( 'handbook_display_toc', true ) ) {
     81                        return $content;
     82                }
     83
    8084                if ( $items ) {
    8185                        $contents_header = 'h' . $items[0][2]; // Duplicate the first <h#> tag in the document.
Note: See TracChangeset for help on using the changeset viewer.