Changeset 12392
- Timestamp:
- 02/09/2023 09:36:57 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php
r12138 r12392 85 85 86 86 public function load_filters() { 87 if ( is_singular( $this->post_types ) && ! is_embed() ) { 87 $page_supports_toc = is_singular( $this->post_types ) && ! is_embed(); 88 89 /** 90 * Filter whether the table of contents should be injected into the page. 91 * 92 * @param bool $page_supports_toc True if the current page supports a table of contents. 93 */ 94 $should_add_toc = apply_filters( 'wporg_handbook_toc_should_add_toc', $page_supports_toc ); 95 96 if ( $should_add_toc ) { 88 97 add_filter( 'the_content', array( $this, 'add_toc' ) ); 89 98 }
Note: See TracChangeset
for help on using the changeset viewer.