Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Fix [toc] override on disabled auto insertion post type
Browse files Browse the repository at this point in the history
re #164
  • Loading branch information
zedzedzed committed Feb 22, 2024
1 parent 7ed3833 commit 0868e53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-toc-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ public function extract_headings( &$find, &$replace, $content = '' ) {
public function is_eligible() {
global $post;

$custom_toc_position = strpos( $post->content, '[TOC]' );
$custom_toc_position = has_shortcode( $post->post_content, 'toc' );

// Do not trigger the TOC on REST Requests unless explicitly enabled.
// This ensures that the TOC is not included in REST API responses by default.
Expand Down

0 comments on commit 0868e53

Please sign in to comment.