Skip to content

Commit 4eebe7a

Browse files
committed
Simplifying logic.
1 parent 3dc7ff3 commit 4eebe7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ function simpletoc_add_ids_to_content( $content ) {
159159

160160
$content = add_ids_to_blocks( $content );
161161

162+
$content = simpletoc_render_toc( $content );
163+
162164
return $content;
163165
}
164166

165167
// Run late, but before toc is rendered as to be able to track and add IDs to the headings.
166168
add_filter( 'the_content', __NAMESPACE__ . '\simpletoc_add_ids_to_content', 100 );
167169

168-
add_filter( 'the_content', __NAMESPACE__ . '\simpletoc_render_toc', 101 );
169-
170170
/**
171171
* Renders the Table of Contents block.
172172
*

0 commit comments

Comments
 (0)