Changeset 8765
- Timestamp:
- 05/09/2019 08:25:34 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php
r8725 r8765 14 14 15 15 add_filter( 'handbook_label', array( $this, 'change_handbook_label' ), 10, 2 ); 16 add_filter( 'handbook_display_toc', array( $this, 'disable_toc' ) ); 16 17 add_filter( 'get_post_metadata', array( $this, 'fix_markdown_source_meta' ), 10, 4 ); 17 18 add_filter( 'wporg_markdown_before_transform', array( $this, 'wporg_markdown_before_transform' ), 10, 2 ); … … 44 45 45 46 return $label; 47 } 48 49 /** 50 * Disables table of contents in-page widget for the Block Editor handbook. 51 * 52 * @param $display Should the table of contents be displayed? 53 * @return bool 54 */ 55 public function disable_toc( $display ) { 56 if ( $this->get_post_type() === get_post_type() ) { 57 $display = false; 58 } 59 60 return $display; 46 61 } 47 62
Note: See TracChangeset
for help on using the changeset viewer.