Changeset 12327
- Timestamp:
- 12/14/2022 08:50:22 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php
r12288 r12327 54 54 55 55 public function load_filters() { 56 if ( is_singular( $this->post_types ) && ! is_embed() && ! is_front_page() ) { 56 $page_supports_toc = is_singular( $this->post_types ) && ! is_embed() && ! is_front_page(); 57 58 /** 59 * Filter whether the table of contents should be injected into the page. 60 * 61 * @param bool $page_supports_toc True if the current page supports a table of contents. 62 */ 63 $should_add_toc = apply_filters( 'wporg_handbook_toc_should_add_toc', $page_supports_toc ); 64 65 if ( $should_add_toc ) { 57 66 add_filter( 'the_content', array( $this, 'add_toc' ) ); 58 67 }
Note: See TracChangeset
for help on using the changeset viewer.